let jit tests run on jit; among other things

This commit is contained in:
Arya Irani 2024-04-04 01:20:26 -06:00
parent 7a7fb05044
commit f5d187ef84
5 changed files with 36 additions and 55 deletions

View File

@ -1,18 +1,9 @@
Note: This should be forked off of the codebase created by base.md
If you want to define more complex tests somewhere other than `tests.u`, just `load my-tests.u` then `add`,
then reference those tests (which should be of type `'{IO,Exception,Tests} ()`, written using calls
to `Tests.check` and `Tests.checkEqual`).
```ucm
.> run tests
()
```
```ucm
.> run tests.interpreter.only
runtime-tests/selected> run tests
()
runtime-tests/selected> run tests.interpreter.only
()

View File

@ -2,21 +2,16 @@
set -ex
ucm=$(stack exec -- which unison)
echo $ucm
echo "$ucm"
base_codebase=${XDG_CACHE_HOME:-"$HOME/.cache"}/unisonlanguage/base.unison
runtime_tests_version="@unison/runtime-tests/main"
echo $runtime_tests_version
if [ ! -d $base_codebase ]; then
echo !!!! Creating a codebase in $base_codebase
$ucm transcript -S $base_codebase unison-src/builtin-tests/base.md
fi
dir=${XDG_DATA_HOME:-"$HOME/.local/share"}/unisonlanguage/scheme-libs
echo $dir
mkdir -p $dir
cp -r scheme-libs/* $dir/
echo $ucm transcript.fork -c $base_codebase unison-src/builtin-tests/interpreter-tests.md
time $ucm transcript.fork -c $base_codebase unison-src/builtin-tests/interpreter-tests.md
codebase=${XDG_CACHE_HOME:-"$HOME/.cache"}/unisonlanguage/runtime-tests.unison
runtime_tests_version="$runtime_tests_version" \
envsubst '$runtime_tests_version' \
< unison-src/builtin-tests/interpreter-tests.tpl.md \
> unison-src/builtin-tests/interpreter-tests.md
echo "$ucm" transcript.fork -C $codebase -S $codebase unison-src/builtin-tests/interpreter-tests.md
time "$ucm" transcript.fork -C $codebase -S $codebase unison-src/builtin-tests/interpreter-tests.md

View File

@ -1,22 +1,16 @@
Note: This should be forked off of the codebase created by base.md
If you want to define more complex tests somewhere other than `tests.u`, just `load my-tests.u` then `add`,
then reference those tests (which should be of type `'{IO,Exception,Tests} ()`, written using calls
to `Tests.check` and `Tests.checkEqual`).
```ucm
.> run.native tests
()
```
```ucm
.> run.native tests.jit.only
runtime-tests/selected> run.native tests
()
runtime-tests/selected> run.native tests.jit.only
()
```
Per Dan:
It's testing a flaw in how we were sending code from a scratch file to the native runtime, when that happened multiple times.
Related to the verifiable refs and recursive functions.
```unison
foo = do
go : Nat ->{Exception} ()

View File

@ -3,15 +3,10 @@ set -ex
ucm=$(stack exec -- which unison)
base_codebase=${XDG_CACHE_HOME:-"$HOME/.cache"}/unisonlanguage/base.unison
runtime_tests_version="@unison/runtime-tests/main"
echo $runtime_tests_version
if [ ! -d $base_codebase ]; then
echo !!!! Creating a codebase in $base_codebase
$ucm transcript -S $base_codebase unison-src/builtin-tests/base.md
else
echo !!!! Updating the codebase in $base_codebase
$ucm transcript.fork -c $base_codebase -S $base_codebase unison-src/builtin-tests/base.md
fi
codebase=${XDG_CACHE_HOME:-"$HOME/.cache"}/unisonlanguage/runtime-tests.unison
dir=${XDG_DATA_HOME:-"$HOME/.local/share"}/unisonlanguage/scheme-libs
echo $dir
@ -19,4 +14,10 @@ echo $dir
mkdir -p $dir
cp -r scheme-libs/* $dir/
time $ucm transcript.fork -c $base_codebase unison-src/builtin-tests/jit-tests.md
runtime_tests_version="$runtime_tests_version" \
envsubst '$runtime_tests_version' \
< unison-src/builtin-tests/jit-tests.tpl.md \
> unison-src/builtin-tests/jit-tests.md
# this ought to have the --runtime-path flag passed appropriately
time "$ucm" transcript.fork -C $codebase -S $codebase unison-src/builtin-tests/jit-tests.md

View File

@ -1,12 +1,12 @@
```ucm:hide
```ucm:hide:error
.> delete.project nothing
.> delete.project runtime-tests
.> clone ${runtime_tests_version} runtime-tests/selected
```
```ucm
runtime-tests/selected> run tests
runtime-tests/selected> run tests.jit.only
runtime-tests/selected> run.native tests
runtime-tests/selected> run.native tests.jit.only
```
Per Dan: