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 1a2454a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
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
22 changes: 21 additions & 1 deletion tests/case_utils/case_validate/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ SHELL := /bin/bash

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

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 +62,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 +78,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 1a2454a

Please sign in to comment.