trueagi-io / metta-wam

A Hyperon MeTTa Interpreter/Transpilier that targets the Warren Abstract Machine
7 stars 9 forks source link

Update `scripts/run_commit_tests.sh` to Run Tests and Generate `/tmp/SHARED.UNITS` #70

Closed TeamSPoon closed 22 hours ago

TeamSPoon commented 4 weeks ago

The current scripts/run_commit_tests.sh script is not fully configured to run the tests and generate the /tmp/SHARED.UNITS file. To ensure that the tests are executed and the results are correctly captured in the expected file, we need to modify this script.

Task

Acceptance Criteria

Notes

AdrickTench commented 3 weeks ago

It seems to me that mettalog tests/baseline_compat already generates the /tmp/SHARED.UNITS file. So it seems like the real work for this script then is actually to verify/install MettaLog?

I figure logging is good, and running the tests seems to generate a lot of output, so so far I wrote

timestamp=$(date +"%Y-%m-%dT%H:%M:%S")
logfile=/tmp/run_commit_tests_$timestamp.log

echo Running baseline_compat tests, logging to $logfile
mettalog tests/baseline_compat > $logfile 2>&1

The log is really huge though, and contains a lot of non-ASCII characters - my text editor is not happy when I look at it. Maybe we should generate less? Or I could try only logging the error output and pipe the rest to null

TeamSPoon commented 3 weeks ago

Yes the real meat of this issue is the first task (gettign the system installed)

The next part about runnig the tests is important to and actualyl you need to make up an output directory and do a ...

mettalog --output=reports/tests_output/ran-at-$timestamp/ tests/baseline_compat 2>&1 > /dev/null

Oh yeah this should be piped to (both stdin and stdout) to /dev/null .. no reason to capture it! The output of tests are being captured into individual *.ansi files that get converted to .metta.html files in a output directory.

the output directory you passed will get used in the scripts/into_junit.py and become a link to github pages instead of logicmoo.org

AdrickTench commented 1 week ago

So we're running tests on commit now, which means the meat of this issue is done:

mettalog --test --clean --output=$output  tests/baseline_compat/module-system/

But also copying a prior run so as to have a bigger report:

cat ./reports/SHARED.UNITS.PREV.md >> /tmp/SHARED.UNITS

So let's decide:

AdrickTench commented 22 hours ago

We are able to publish both nightly and CI tests to pages (see https://trueagi-io.github.io/metta-wam/nightly/ and https://trueagi-io.github.io/metta-wam/ci/). run_commit_tests.sh runs the CI tests and run_nightly_tests.sh runs the nightlies.