Skip to content

Commit a75641f

Browse files
committed
Add meta data to fpm package manifest
- disable build.auto-tests for fpm build - move unit tests to separate directory to avoid fpm failure
1 parent f1df335 commit a75641f

File tree

9 files changed

+67
-39
lines changed

9 files changed

+67
-39
lines changed

fpm.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name = "s-dftd3"
22
version = "0.3.0"
33
license = "LGPL-3.0-or-later"
4+
maintainer = ["@awvwgk"]
5+
author = ["Sebastian Ehlert"]
6+
copyright = "2019-2021 Sebastian Ehlert"
47
description = "Simple reimplementation of the DFT-D3 method"
8+
keywords = ["dispersion-correction", "quantum-chemistry"]
59

610
[dependencies]
711
[dependencies.mctc-lib]
@@ -10,3 +14,10 @@ git = "https://github.com/grimme-lab/mctc-lib"
1014
[dev-dependencies]
1115
[dev-dependencies.mstore]
1216
git = "https://github.com/grimme-lab/mstore"
17+
18+
[build]
19+
auto-tests = false
20+
21+
[[test]]
22+
name = "tester"
23+
source-dir = "test/unit"

test/meson.build

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,4 @@ if has_cc
1818
subdir('api')
1919
endif
2020

21-
# Create mstore as subproject for testing
22-
mstore_prj = subproject(
23-
'mstore',
24-
version: '>=0.1',
25-
required: not meson.is_subproject(),
26-
default_options: [
27-
'default_library=static',
28-
],
29-
)
30-
# If we do not find mstore and are a subproject, we just skip testing
31-
if not mstore_prj.found()
32-
subdir_done()
33-
endif
34-
mstore_dep = mstore_prj.get_variable('mstore_dep')
35-
36-
tests = [
37-
'ncoord',
38-
'model',
39-
'dftd3',
40-
'param',
41-
'periodic',
42-
]
43-
44-
test_srcs = files(
45-
'main.f90',
46-
)
47-
foreach t : tests
48-
test_srcs += files('test_@0@.f90'.format(t.underscorify()))
49-
endforeach
50-
51-
tester = executable(
52-
'tester',
53-
sources: test_srcs,
54-
dependencies: [sdftd3_dep, mstore_dep],
55-
)
56-
57-
foreach t : tests
58-
test(t, tester, args: t)
59-
endforeach
21+
subdir('unit')
File renamed without changes.

test/unit/meson.build

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This file is part of s-dftd3.
2+
# SPDX-Identifier: LGPL-3.0-or-later
3+
#
4+
# s-dftd3 is free software: you can redistribute it and/or modify it under
5+
# the terms of the GNU Lesser General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# s-dftd3 is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU Lesser General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Lesser General Public License
15+
# along with s-dftd3. If not, see <https://www.gnu.org/licenses/>.
16+
17+
# Create mstore as subproject for testing
18+
mstore_prj = subproject(
19+
'mstore',
20+
version: '>=0.1',
21+
required: not meson.is_subproject(),
22+
default_options: [
23+
'default_library=static',
24+
],
25+
)
26+
# If we do not find mstore and are a subproject, we just skip testing
27+
if not mstore_prj.found()
28+
subdir_done()
29+
endif
30+
mstore_dep = mstore_prj.get_variable('mstore_dep')
31+
32+
tests = [
33+
'ncoord',
34+
'model',
35+
'dftd3',
36+
'param',
37+
'periodic',
38+
]
39+
40+
test_srcs = files(
41+
'main.f90',
42+
)
43+
foreach t : tests
44+
test_srcs += files('test_@0@.f90'.format(t.underscorify()))
45+
endforeach
46+
47+
tester = executable(
48+
'tester',
49+
sources: test_srcs,
50+
dependencies: [sdftd3_dep, mstore_dep],
51+
)
52+
53+
foreach t : tests
54+
test(t, tester, args: t)
55+
endforeach
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)