Skip to content

Commit 705dc77

Browse files
committed
Align test directories with /case_utils structure
A follow-on patch will regenerate files that will have updated UUIDs. Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent c8ddab1 commit 705dc77

27 files changed

+100
-55
lines changed

tests/Makefile

Lines changed: 11 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,14 @@ SHELL := /bin/bash
1515

1616
top_srcdir := $(shell cd .. ; pwd)
1717

18-
srcdir := $(shell pwd)
19-
2018
PYTHON3 ?= $(shell which python3.9 2>/dev/null || which python3.8 2>/dev/null || which python3.7 2>/dev/null || which python3.6 2>/dev/null || which python3)
2119

2220
all: \
23-
all-case_file \
24-
all-case_sparql_construct \
25-
all-case_sparql_select
21+
all-case_utils
2622

2723
.PHONY: \
28-
all-case_file \
29-
all-case_sparql_construct \
30-
all-case_sparql_select \
31-
check-case_file \
32-
check-case_sparql_construct \
33-
check-case_sparql_select \
24+
all-case_utils \
25+
check-case_utils \
3426
check-isomorphic_diff \
3527
check-mypy \
3628
download
@@ -60,51 +52,26 @@ all: \
6052
.
6153
touch $@
6254

63-
all-case_file: \
64-
.venv.done.log
65-
$(MAKE) \
66-
--directory case_file
67-
68-
all-case_sparql_construct: \
69-
.venv.done.log
70-
$(MAKE) \
71-
--directory case_sparql_construct
7255

73-
all-case_sparql_select: \
56+
all-case_utils: \
7457
.venv.done.log
7558
$(MAKE) \
76-
--directory case_sparql_select
59+
--directory case_utils
7760

7861
# These check calls are provided in preferred run-order.
7962
check: \
80-
check-isomorphic_diff \
8163
check-mypy \
82-
check-case_file \
83-
check-case_sparql_construct \
84-
check-case_sparql_select
64+
check-isomorphic_diff \
65+
check-case_utils
8566
source venv/bin/activate \
8667
&& pytest \
87-
--ignore case_file \
88-
--ignore case_sparql_construct \
89-
--ignore case_sparql_select \
68+
--ignore case_utils \
9069
--log-level=DEBUG
9170

92-
check-case_file: \
93-
.venv.done.log
94-
$(MAKE) \
95-
--directory case_file \
96-
check
97-
98-
check-case_sparql_construct: \
99-
.venv.done.log
100-
$(MAKE) \
101-
--directory case_sparql_construct \
102-
check
103-
104-
check-case_sparql_select: \
71+
check-case_utils: \
10572
.venv.done.log
10673
$(MAKE) \
107-
--directory case_sparql_select \
74+
--directory case_utils \
10875
check
10976

11077
check-isomorphic_diff: \
@@ -119,21 +86,13 @@ check-mypy: \
11986
source venv/bin/activate \
12087
&& mypy \
12188
$(top_srcdir)/case_utils \
122-
case_file \
123-
case_sparql_construct \
12489
case_utils \
12590
hexbinary \
12691
src
12792

12893
clean:
12994
@$(MAKE) \
130-
--directory case_sparql_select \
131-
clean
132-
@$(MAKE) \
133-
--directory case_sparql_construct \
134-
clean
135-
@$(MAKE) \
136-
--directory case_file \
95+
--directory case_utils \
13796
clean
13897
@rm -f \
13998
.venv.done.log

tests/case_utils/Makefile

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#!/usr/bin/make -f
2+
3+
# This software was developed at the National Institute of Standards
4+
# and Technology by employees of the Federal Government in the course
5+
# of their official duties. Pursuant to title 17 Section 105 of the
6+
# United States Code this software is not subject to copyright
7+
# protection and is in the public domain. NIST assumes no
8+
# responsibility whatsoever for its use by other parties, and makes
9+
# no guarantees, expressed or implied, about its quality,
10+
# reliability, or any other characteristic.
11+
#
12+
# We would appreciate acknowledgement if the software is used.
13+
14+
SHELL := /bin/bash
15+
16+
top_srcdir := $(shell cd ../.. ; pwd)
17+
18+
tests_srcdir := $(top_srcdir)/tests
19+
20+
all: \
21+
all-case_file \
22+
all-case_sparql_construct \
23+
all-case_sparql_select
24+
25+
.PHONY: \
26+
all-case_file \
27+
all-case_sparql_construct \
28+
all-case_sparql_select \
29+
check-case_file \
30+
check-case_sparql_construct \
31+
check-case_sparql_select
32+
33+
all-case_file: \
34+
$(tests_srcdir)/.venv.done.log
35+
$(MAKE) \
36+
--directory case_file
37+
38+
all-case_sparql_construct: \
39+
$(tests_srcdir)/.venv.done.log
40+
$(MAKE) \
41+
--directory case_sparql_construct
42+
43+
all-case_sparql_select: \
44+
$(tests_srcdir)/.venv.done.log
45+
$(MAKE) \
46+
--directory case_sparql_select
47+
48+
check: \
49+
check-case_file \
50+
check-case_sparql_construct \
51+
check-case_sparql_select
52+
source $(tests_srcdir)/venv/bin/activate \
53+
&& pytest \
54+
--ignore case_file \
55+
--ignore case_sparql_construct \
56+
--ignore case_sparql_select \
57+
--log-level=DEBUG
58+
59+
check-case_file: \
60+
$(tests_srcdir)/.venv.done.log
61+
$(MAKE) \
62+
--directory case_file \
63+
check
64+
65+
check-case_sparql_construct: \
66+
$(tests_srcdir)/.venv.done.log
67+
$(MAKE) \
68+
--directory case_sparql_construct \
69+
check
70+
71+
check-case_sparql_select: \
72+
$(tests_srcdir)/.venv.done.log
73+
$(MAKE) \
74+
--directory case_sparql_select \
75+
check
76+
77+
clean:
78+
@$(MAKE) \
79+
--directory case_sparql_select \
80+
clean
81+
@$(MAKE) \
82+
--directory case_sparql_construct \
83+
clean
84+
@$(MAKE) \
85+
--directory case_file \
86+
clean
File renamed without changes.

tests/case_file/Makefile renamed to tests/case_utils/case_file/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
SHELL := /bin/bash
1515

16-
top_srcdir := $(shell cd ../.. ; pwd)
16+
top_srcdir := $(shell cd ../../.. ; pwd)
1717

1818
tests_srcdir := $(top_srcdir)/tests
1919

File renamed without changes.
File renamed without changes.

tests/case_sparql_construct/Makefile renamed to tests/case_utils/case_sparql_construct/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
SHELL := /bin/bash
1515

16-
top_srcdir := $(shell cd ../.. ; pwd)
16+
top_srcdir := $(shell cd ../../.. ; pwd)
1717

1818
tests_srcdir := $(top_srcdir)/tests
1919

tests/case_sparql_select/Makefile renamed to tests/case_utils/case_sparql_select/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
SHELL := /bin/bash
1515

16-
top_srcdir := $(shell cd ../.. ; pwd)
16+
top_srcdir := $(shell cd ../../.. ; pwd)
1717

1818
tests_srcdir := $(top_srcdir)/tests
1919

0 commit comments

Comments
 (0)