From: Thomas Walker Lynch Date: Wed, 16 Oct 2024 06:50:47 +0000 (+0000) Subject: first block test passes, so work flow and framework are working X-Git-Url: https://git.reasoningtechnology.com/style/static/git-favicon.png?a=commitdiff_plain;h=8c1239c71bb15758d4517257438e19223a414912;p=Ariadne first block test passes, so work flow and framework are working --- diff --git a/developer/tool/make b/developer/tool/make index a8a9022..ab9c643 100755 --- a/developer/tool/make +++ b/developer/tool/make @@ -34,16 +34,15 @@ echo "Creating JAR file..." echo "Creating shell wrappers..." mkdir -p shell + # wrapper is a space separated list wrapper=build for file in $wrapper;do - - cat > shell/$file << EOL + cat > shell/$file << EOL #!/bin/bash java com/ReasoningTechnology/Ariadne/$file EOL chmod +x shell/$file - -done + done echo "$(script_fp) done." diff --git a/env_administrator b/env_administrator index 744a861..4b691ce 100644 --- a/env_administrator +++ b/env_administrator @@ -1,4 +1,9 @@ #!/usr/bin/env bash +script_path="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" +export REPO_HOME="${script_path%}/" +echo REPO_HOME "$REPO_HOME" + +cd "$REPO_HOME" source tool/env diff --git a/env_developer b/env_developer index 4236627..8659f86 100644 --- a/env_developer +++ b/env_developer @@ -1,5 +1,10 @@ #!/usr/bin/env bash +script_path="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" +export REPO_HOME="${script_path%}/" +echo REPO_HOME "$REPO_HOME" + +cd "$REPO_HOME" source tool_shared/bespoke/env source developer/tool/env diff --git a/env_tester b/env_tester index 969a5d1..d1bd2d5 100644 --- a/env_tester +++ b/env_tester @@ -1,5 +1,9 @@ #!/usr/bin/env bash +script_path="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" +export REPO_HOME="${script_path%}/" +echo REPO_HOME "$REPO_HOME" + +cd "$REPO_HOME" source tool_shared/bespoke/env source tester/tool/env - diff --git a/release/Ariadne.jar b/release/Ariadne.jar index 74faa32..f2eb7a1 100644 Binary files a/release/Ariadne.jar and b/release/Ariadne.jar differ diff --git a/tester/document/about_TestBench.txt b/tester/document/about_TestBench.txt index de27572..7bca2ea 100644 --- a/tester/document/about_TestBench.txt +++ b/tester/document/about_TestBench.txt @@ -1,10 +1,7 @@ -javac/TestBench does not belong here. It should have its own project. +javac/TestBench is the non-project specific part of the test bench. (It does not +belong here, rather it should be its own project.) + +javac/TestBenchAriadne Has the project specific tests. -Currently it must be made first using `make_TestBench`. It will be made again, -redundantly as part of `make` because it is in the javac directory. This does -not hurt anything. -Later we will use an earlier version of the build tool to build the build tool, -and cases and `make_TestBench` can be handled more gracefully if it is still -here. diff --git a/tester/document/what_the_tests_do.txt b/tester/document/what_the_tests_do.txt index 3f107d9..cba1483 100644 --- a/tester/document/what_the_tests_do.txt +++ b/tester/document/what_the_tests_do.txt @@ -3,6 +3,7 @@ test0 - see if the tool will compile when given an empty graph. test1 - see what happens with a single symbolic node -Remaining tests are compiled into javac/TestBenchAriande +javac/TestBenchAriadne - the remainder of the tests. + diff --git a/tester/javac/TestBench.java b/tester/javac/TestBench.java index bd08267..9294d43 100644 --- a/tester/javac/TestBench.java +++ b/tester/javac/TestBench.java @@ -1,4 +1,4 @@ -package com.reasoningtechnology.TestBench; +package com.ReasoningTechnology.TestBench; import java.util.Map; public class TestBench { diff --git a/tester/javac/TestBenchAriadne.java b/tester/javac/TestBenchAriadne.java index 88a6bd2..9f6697e 100644 --- a/tester/javac/TestBenchAriadne.java +++ b/tester/javac/TestBenchAriadne.java @@ -1,6 +1,6 @@ package com.ReasoningTechnology.Ariadne.TestBench; -import com.reasoningtechnology.Ariadna.*; -import com.reasoningtechnology.TestBench.*; +import com.ReasoningTechnology.Ariadne.File; +import com.ReasoningTechnology.TestBench.*; import java.util.Map; import java.util.HashMap; diff --git a/tester/jvm/AriadnaTestBench.jar b/tester/jvm/AriadnaTestBench.jar deleted file mode 100644 index 0c16d79..0000000 Binary files a/tester/jvm/AriadnaTestBench.jar and /dev/null differ diff --git a/tester/jvm/TestBench.jar b/tester/jvm/TestBench.jar deleted file mode 100644 index 40f1e0f..0000000 Binary files a/tester/jvm/TestBench.jar and /dev/null differ diff --git a/tester/jvm/TestBenchAriadne.jar b/tester/jvm/TestBenchAriadne.jar new file mode 100644 index 0000000..445ff47 Binary files /dev/null and b/tester/jvm/TestBenchAriadne.jar differ diff --git a/tester/shell/.githolder b/tester/shell/.githolder new file mode 100644 index 0000000..e69de29 diff --git a/tester/shell/TestBenchAriadne b/tester/shell/TestBenchAriadne new file mode 100755 index 0000000..9a7520a --- /dev/null +++ b/tester/shell/TestBenchAriadne @@ -0,0 +1,2 @@ +#!/bin/env bash +java com.ReasoningTechnology.Ariadne.TestBench.TestBenchAriadne diff --git a/tester/tool/clean b/tester/tool/clean deleted file mode 100755 index ff8ac50..0000000 --- a/tester/tool/clean +++ /dev/null @@ -1,21 +0,0 @@ -# input guards - - env_must_be="tester/tool/env" - if [ "$ENV" != "$env_must_be" ]; then - echo "$(script_fp):: error: must be run in the $env_must_be environment" - exit 1 - fi - -# Paths -BUILD_DIR="$REPO_HOME/tester/scratch_pad" -JAR_OUTPUT_DIR="$REPO_HOME/tester/jvm" - -# Clean the scratch_pad directory -echo "Cleaning up scratch_pad directory..." -rm -rf "$BUILD_DIR"/* - -# Optionally clean the jar output as well -echo "Cleaning up jvm directory..." -rm -f "$JAR_OUTPUT_DIR"/*.jar - -echo "$script_name done." diff --git a/tester/tool/clean_build_directories b/tester/tool/clean_build_directories new file mode 100755 index 0000000..2aff503 --- /dev/null +++ b/tester/tool/clean_build_directories @@ -0,0 +1,22 @@ +#!/bin/bash + +# Caveat: the 'shell' directory is for built wrapper functions. `clean_build_directories` will +# remove all the files in this directory. For bespoke scripts used by the tester, put +# them in the `tool` directory. + +# input guards + env_must_be="tester/tool/env" + if [ "$ENV" != "$env_must_be" ]; then + echo "$(script_fp):: error: must be run in the $env_must_be environment" + exit 1 + fi + +# remove files + set -x + cd "$REPO_HOME"/tester + rm -r scratch_pad/* + rm jvm/* + rm shell/* + set +x + +echo "$(script_fn) done." diff --git a/tester/tool/env b/tester/tool/env index f6b871a..e406896 100644 --- a/tester/tool/env +++ b/tester/tool/env @@ -25,7 +25,7 @@ export CLASSPATH=\ "$JAVA_HOME"/lib\ :"$REPO_HOME"/release/Ariadne.jar\ :"$REPO_HOME"/tester/jvm/TestBench.jar\ -:"$REPO_HOME"/tester/jvm/AriadneTestBench.jar\ +:"$REPO_HOME"/tester/jvm/TestBenchAriadne.jar\ :"$CLASSPATH" # misc diff --git a/tester/tool/make b/tester/tool/make index cdcd57d..9ba7b2e 100755 --- a/tester/tool/make +++ b/tester/tool/make @@ -8,14 +8,24 @@ exit 1 fi -# the build -set -x +echo "Compiling files..." + set -x cd $REPO_HOME/tester - javac -d scratch_pad javac/*.java - jar cf jvm/AriadnaTestBench.jar -C scratch_pad . + jar cf jvm/TestBenchAriadne.jar -C scratch_pad . + set +x -set +x +echo "Creating shell wrappers..." + mkdir -p shell + # wrapper is a space separated list + wrapper=TestBenchAriadne + for file in $wrapper;do + cat > shell/$file << EOL +#!/bin/env bash +java com.ReasoningTechnology.Ariadne.TestBench.$file +EOL + chmod +x shell/$file + done echo "$(script_fp) done." diff --git a/tester/tool/make_TestBench b/tester/tool/make_TestBench deleted file mode 100755 index dd5daa9..0000000 --- a/tester/tool/make_TestBench +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/env bash - -# input guards - - env_must_be="tester/tool/env" - if [ "$ENV" != "$env_must_be" ]; then - echo "$(script_fp):: error: must be run in the $env_must_be environment" - exit 1 - fi - -# the build -set -x - - cd $REPO_HOME/tester - - javac -d scratch_pad javac/TestBench.java - jar cf jvm/TestBench.jar -C scratch_pad . - -set +x - -echo "$(script_fp) done." diff --git a/tool_shared/bespoke/env b/tool_shared/bespoke/env index d38b1bc..f36023e 100644 --- a/tool_shared/bespoke/env +++ b/tool_shared/bespoke/env @@ -1,11 +1,8 @@ #!/usr/bin/env bash # environment shared by entire project - # number one task, establish REPO_HOME # this is specific to this script being in the .../tools_shared/env directory - script_path="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" - export REPO_HOME="${script_path%/*/*}/" export PROJECT=$(basename "$REPO_HOME") ## set the shell prompt to show the project @@ -54,7 +51,6 @@ export JAVA_HOME="$REPO_HOME/tool_shared/third_party/jdk-11" # some feedback to show all went well echo ENV "$ENV" -echo REPO_HOME "$REPO_HOME" echo PROJECT "$PROJECT"