Skip to content

Commit a2c0ad4

Browse files
committed
Add copy of monolithic CASE build for a UCO test
UCO Issue 393 added a test that assumed a file's existence during the UCO CI. That file is the UCO monolithic build, a purposefully Git- ignored build artifact. `case-utils` currently repurposes the UCO `pytest` script to ensure UCO's tests also pass when substituting the monolithic build of CASE. With Issue 393, the file reference to the UCO monolithic build needs to be handled downstream in `case-utils`. This patch adds that file by making a copy as a Git-ignored file. (A soft link could cause potential confusion due to management of the modification timestamp on the monolithic build file.) References: * ucoProject/UCO#393 * [ONT-295] Release CASE 1.0.0 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent 3cc7c59 commit a2c0ad4

File tree

5 files changed

+34
-1
lines changed

5 files changed

+34
-1
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ check: \
8888

8989
clean:
9090
@$(MAKE) \
91+
PYTHON3=$(PYTHON3) \
9192
--directory tests \
9293
clean
9394
@rm -f \
@@ -123,5 +124,6 @@ distclean: \
123124
download: \
124125
.git_submodule_init.done.log
125126
$(MAKE) \
127+
PYTHON3=$(PYTHON3) \
126128
--directory tests \
127129
download

tests/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ all: \
5555
all-case_utils: \
5656
.venv.done.log
5757
$(MAKE) \
58+
PYTHON3=$(PYTHON3) \
5859
--directory case_utils
5960

6061
# These check calls are provided in preferred run-order.
@@ -70,6 +71,7 @@ check: \
7071
check-case_utils: \
7172
.venv.done.log
7273
$(MAKE) \
74+
PYTHON3=$(PYTHON3) \
7375
--directory case_utils \
7476
check
7577

@@ -93,6 +95,7 @@ check-mypy: \
9395

9496
clean:
9597
@$(MAKE) \
98+
PYTHON3=$(PYTHON3) \
9699
--directory case_utils \
97100
clean
98101
@rm -f \

tests/case_utils/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ SHELL := /bin/bash
1515

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

18+
PYTHON3 ?= python3
19+
1820
tests_srcdir := $(top_srcdir)/tests
1921

2022
all: \
@@ -51,6 +53,7 @@ all-case_sparql_select: \
5153
all-case_validate: \
5254
$(tests_srcdir)/.venv.done.log
5355
$(MAKE) \
56+
PYTHON3=$(PYTHON3) \
5457
--directory case_validate
5558

5659
check: \
@@ -86,11 +89,13 @@ check-case_sparql_select: \
8689
check-case_validate: \
8790
$(tests_srcdir)/.venv.done.log
8891
$(MAKE) \
92+
PYTHON3=$(PYTHON3) \
8993
--directory case_validate \
9094
check
9195

9296
clean:
9397
@$(MAKE) \
98+
PYTHON3=$(PYTHON3) \
9499
--directory case_validate \
95100
clean
96101
@$(MAKE) \
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uco_monolithic.ttl

tests/case_utils/case_validate/Makefile

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ SHELL := /bin/bash
1515

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

18+
PYTHON3 ?= python3
19+
20+
case_version := $(shell $(PYTHON3) $(top_srcdir)/case_utils/ontology/version_info.py)
21+
ifeq ($(case_version),)
22+
$(error Unable to determine CASE version)
23+
endif
24+
1825
tests_srcdir := $(top_srcdir)/tests
1926

2027
all: \
@@ -57,7 +64,8 @@ check-cli:
5764
--directory cli \
5865
check
5966

60-
check-uco_test_examples:
67+
check-uco_test_examples: \
68+
uco_monolithic.ttl
6169
$(MAKE) \
6270
--directory uco_test_examples \
6371
check
@@ -72,3 +80,17 @@ clean:
7280
@$(MAKE) \
7381
--directory cli \
7482
clean
83+
84+
# This file is necessary for a UCO unit test that case-utils runs
85+
# substituting its own monolithic build.
86+
# It is incorrect to designate this the "UCO" monolithic build due to
87+
# CASE concepts being present, but using the CASE build here keeps with
88+
# the spirit of confirming UCO tests continue to pass when using the
89+
# CASE monolithic build.
90+
uco_monolithic.ttl: \
91+
$(top_srcdir)/case_utils/ontology/version_info.py \
92+
$(top_srcdir)/case_utils/ontology/case-$(case_version).ttl
93+
rm -f $@
94+
cp \
95+
$(top_srcdir)/case_utils/ontology/case-$(case_version).ttl \
96+
$@

0 commit comments

Comments
 (0)