Skip to content

Commit cbe52dd

Browse files
committed
Make tests use local files instead of /tmp/ for opam CI
1 parent bd2dc40 commit cbe52dd

7 files changed

Lines changed: 16 additions & 14 deletions

File tree

tests/integration/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# This is meant to be run from `make check` or `make build-tests` in root directory
12
# To run this not through the repo root Makefile, please provide the $KAPPABIN path
23
OUTPUT_PATH:=output
34
ERROR:=error
@@ -19,6 +20,7 @@ help:
1920
@echo 'make clean: recursively clean everything but the reference files'
2021
@echo 'make clean_all: recursively clean everything including the reference files'
2122
@echo
23+
@echo 'This is meant to be run from `make check` or `make build-tests` in root directory'
2224
@echo 'To run this from this directory and not from the root Makefile, please specify the KAPPABIN path in the environment.'
2325

2426
# NOTE: COMMENT THIS TO DEBUG
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
#Command-line:
2-
"${KAPPABIN}"KaSim json.ka -seed 840540685 -l 5 -d output -trace /tmp/cflow-json-trace.json -syntax 4 || exit 0
3-
"${KAPPABIN}"KaStor --weak -format json /tmp/cflow-json-trace.json -d output --time-independent || exit 0
1+
#!/bin/sh
2+
TRACE_FILE="./tmp__cflow-json-trace.json"
3+
"${KAPPABIN}"KaSim json.ka -seed 840540685 -l 5 -d output -trace ${TRACE_FILE} -syntax 4 || exit 0
4+
"${KAPPABIN}"KaStor --weak -format json ${TRACE_FILE} -d output --time-independent || exit 0
5+
rm -f ${TRACE_FILE}

tests/integration/cflows/cflows_json/output/LOG.ref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ done
1313
-initial conditions
1414
+ Building initial state (2000 agents)
1515
Done
16-
+ Command line to rerun is: 'KaSim' 'json.ka' '-seed' '840540685' '-l' '5' '-d' 'output' '-trace' '/tmp/cflow-json-trace.json' '-syntax' '4'
16+
+ Command line to rerun is: 'KaSim' 'json.ka' '-seed' '840540685' '-l' '5' '-d' 'output' '-trace' './tmp__cflow-json-trace.json' '-syntax' '4'
1717
______________________________________________________________________
1818
######################################################################
1919
Simulation ended

tests/integration/cflows/cflows_json/output/data.csv.ref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Output of 'KaSim' 'json.ka' '-seed' '840540685' '-l' '5' '-d' 'output' '-trace' '/tmp/cflow-json-trace.json' '-syntax' '4'
1+
# Output of 'KaSim' 'json.ka' '-seed' '840540685' '-l' '5' '-d' 'output' '-trace' './tmp__cflow-json-trace.json' '-syntax' '4'
22
"[T]","ApBp","ABA"
33
0.,0,0
44
1.,66,0

tests/integration/cflows/cflows_json/output/inputs.ka.ref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
%def: "progressBarSymbol" "#"
66
%def: "plotPeriod" "1" "t.u."
77
%def: "outputFileName" "data.csv"
8-
%def: "traceFileName" "/tmp/cflow-json-trace.json"
8+
%def: "traceFileName" "./tmp__cflow-json-trace.json"
99

1010
%agent: A(a{u p}[a.B b.B])
1111
%agent: B(a{u p}[a.A] b[a.A])

tests/integration/simulation/marshal/README

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/sh
2-
3-
BLOB=/tmp/KaSim-test-blob-$(basename $PWD)
4-
2+
BLOB=./tmp__KaSim-test-blob-$(basename $PWD)
53
"${KAPPABIN}"KaSim --compile -make-sim ${BLOB} -seed 496408597 -d output model.ka -syntax 4 && \
64
"${KAPPABIN}"KaSim --compile -load-sim ${BLOB} -seed 958076642 -d output -syntax 4 && \
75
"${KAPPABIN}"KaSim --compile -load-sim ${BLOB} -seed 458154606 -d output -var init 300 -syntax 4 || exit 0

tests/integration/simulation/marshal/output/LOG.ref

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ done
1313
-initial conditions
1414
+ Building initial state (200 agents)
1515
Done
16-
+ Command line to rerun is: 'KaSim' '--compile' '-make-sim' '/tmp/KaSim-test-blob-marshal' '-seed' '496408597' '-d' 'output' 'model.ka' '-syntax' '4'
17-
+ Loading simulation package /tmp/KaSim-test-blob-marshal...
16+
+ Command line to rerun is: 'KaSim' '--compile' '-make-sim' './tmp__KaSim-test-blob-marshal' '-seed' '496408597' '-d' 'output' 'model.ka' '-syntax' '4'
17+
+ Loading simulation package ./tmp__KaSim-test-blob-marshal...
1818
+ Building initial state (200 agents)
1919
Done
20-
+ Command line to rerun is: 'KaSim' '--compile' '-load-sim' '/tmp/KaSim-test-blob-marshal' '-seed' '958076642' '-d' 'output' '-syntax' '4'
21-
+ Loading simulation package /tmp/KaSim-test-blob-marshal...
20+
+ Command line to rerun is: 'KaSim' '--compile' '-load-sim' './tmp__KaSim-test-blob-marshal' '-seed' '958076642' '-d' 'output' '-syntax' '4'
21+
+ Loading simulation package ./tmp__KaSim-test-blob-marshal...
2222
+ Building initial state (600 agents)
2323
Done
24-
+ Command line to rerun is: 'KaSim' '--compile' '-load-sim' '/tmp/KaSim-test-blob-marshal' '-seed' '458154606' '-d' 'output' '-var' 'init' '300' '-syntax' '4'
24+
+ Command line to rerun is: 'KaSim' '--compile' '-load-sim' './tmp__KaSim-test-blob-marshal' '-seed' '458154606' '-d' 'output' '-var' 'init' '300' '-syntax' '4'

0 commit comments

Comments
 (0)