Skip to content

Commit

Permalink
Add copy of monolithic CASE build for a UCO test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ajnelson-nist committed Sep 1, 2022
1 parent 3cc7c59 commit a2c0ad4
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ check: \

clean:
@$(MAKE) \
PYTHON3=$(PYTHON3) \
--directory tests \
clean
@rm -f \
Expand Down Expand Up @@ -123,5 +124,6 @@ distclean: \
download: \
.git_submodule_init.done.log
$(MAKE) \
PYTHON3=$(PYTHON3) \
--directory tests \
download
3 changes: 3 additions & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ all: \
all-case_utils: \
.venv.done.log
$(MAKE) \
PYTHON3=$(PYTHON3) \
--directory case_utils

# These check calls are provided in preferred run-order.
Expand All @@ -70,6 +71,7 @@ check: \
check-case_utils: \
.venv.done.log
$(MAKE) \
PYTHON3=$(PYTHON3) \
--directory case_utils \
check

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

clean:
@$(MAKE) \
PYTHON3=$(PYTHON3) \
--directory case_utils \
clean
@rm -f \
Expand Down
5 changes: 5 additions & 0 deletions tests/case_utils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ SHELL := /bin/bash

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

PYTHON3 ?= python3

tests_srcdir := $(top_srcdir)/tests

all: \
Expand Down Expand Up @@ -51,6 +53,7 @@ all-case_sparql_select: \
all-case_validate: \
$(tests_srcdir)/.venv.done.log
$(MAKE) \
PYTHON3=$(PYTHON3) \
--directory case_validate

check: \
Expand Down Expand Up @@ -86,11 +89,13 @@ check-case_sparql_select: \
check-case_validate: \
$(tests_srcdir)/.venv.done.log
$(MAKE) \
PYTHON3=$(PYTHON3) \
--directory case_validate \
check

clean:
@$(MAKE) \
PYTHON3=$(PYTHON3) \
--directory case_validate \
clean
@$(MAKE) \
Expand Down
1 change: 1 addition & 0 deletions tests/case_utils/case_validate/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uco_monolithic.ttl
24 changes: 23 additions & 1 deletion tests/case_utils/case_validate/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ SHELL := /bin/bash

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

PYTHON3 ?= python3

case_version := $(shell $(PYTHON3) $(top_srcdir)/case_utils/ontology/version_info.py)
ifeq ($(case_version),)
$(error Unable to determine CASE version)
endif

tests_srcdir := $(top_srcdir)/tests

all: \
Expand Down Expand Up @@ -57,7 +64,8 @@ check-cli:
--directory cli \
check

check-uco_test_examples:
check-uco_test_examples: \
uco_monolithic.ttl
$(MAKE) \
--directory uco_test_examples \
check
Expand All @@ -72,3 +80,17 @@ clean:
@$(MAKE) \
--directory cli \
clean

# This file is necessary for a UCO unit test that case-utils runs
# substituting its own monolithic build.
# It is incorrect to designate this the "UCO" monolithic build due to
# CASE concepts being present, but using the CASE build here keeps with
# the spirit of confirming UCO tests continue to pass when using the
# CASE monolithic build.
uco_monolithic.ttl: \
$(top_srcdir)/case_utils/ontology/version_info.py \
$(top_srcdir)/case_utils/ontology/case-$(case_version).ttl
rm -f $@
cp \
$(top_srcdir)/case_utils/ontology/case-$(case_version).ttl \
$@

0 comments on commit a2c0ad4

Please sign in to comment.