Skip to content

Commit 7888af0

Browse files
author
Håkan Mattsson
committed
Ensure lux internal test cases uses same version as the running lux
1 parent 4be26f0 commit 7888af0

File tree

11 files changed

+39
-37
lines changed

11 files changed

+39
-37
lines changed

doc/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ $(GEN_TOC).md: Makefile $(MARKDOWNS) ../vsn.mk
9090
mv $@.tmp $@
9191

9292
$(GEN_DBG_CMDS).md.src: ../ebin/lux_debug.beam
93-
$(LUX) --gen_markdown=$@
93+
../bin/lux --gen_markdown=$@
9494

9595
%.md: %.md.src
96-
$(LUX) --pre_markdown=$@
96+
../bin/lux --pre_markdown=$@
9797

9898
%.md.d: %.md.src
9999
grep -IE '#include +<.*>' $< | sed -e 's#.*<#../#g' -e 's/>.*//g' > $@

test/doc.delux

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
[shell test]
88
-$fail_pattern
99

10-
[invoke eval $OK "../bin/lux --html=validate ../lux.html"]
10+
[invoke eval $OK "$${LUX_BIN}/lux --html=validate ../lux.html"]

test/examples.delux

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[shell test]
66
-LUX ERROR
77
[invoke eval $OK "mkdir -p $LUX_EXTRA_LOGS/$LUX_SHELLNAME"]
8-
!../bin/lux --progress=summary --timeout=5000 --log_dir=$LUX_EXTRA_LOGS/$LUX_SHELLNAME --html=validate ../examples
8+
!$${LUX_BIN}/lux --progress=summary --timeout=5000 --log_dir=$LUX_EXTRA_LOGS/$LUX_SHELLNAME --html=validate ../examples
99

1010
"""?
1111
test case : .*examples/calc.lux

test/history.delux

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[doc Test history generation]
22

3+
[config require=PWD]
4+
35
[config timeout=20000]
46

57
[include include/macros.luxinc]
@@ -10,22 +12,22 @@
1012
[local plain=$LUX_EXTRA_LOGS/$LUX_SHELLNAME]
1113
[local run=$plain/run]
1214
[invoke eval 0 "mkdir -p $run"]
13-
[invoke eval 1 "../bin/lux --progress=summary --timeout=5000 --log_dir=$run/logs --html=validate ../examples"]
14-
[invoke eval 0 "../bin/lux --html=validate --history $plain"]
15+
[invoke eval 1 "$${LUX_BIN}/lux --progress=summary --timeout=5000 --log_dir=$run/logs --html=validate ../examples"]
16+
[invoke eval 0 "$${LUX_BIN}/lux --html=validate --history $plain"]
1517

1618
[shell move]
1719
[progress move]
1820
-LUX ERROR|0 test runs
1921
[local run=$LUX_EXTRA_LOGS/$LUX_SHELLNAME/run]
2022
[invoke eval 0 "mkdir -p $run"]
2123
[invoke eval 0 "cp -r ../examples $run/"]
22-
[invoke eval 1 "../bin/lux --progress=summary --timeout=5000 --log_dir=$run/logs --html=validate $run/examples"]
24+
[invoke eval 1 "$${LUX_BIN}/lux --progress=summary --timeout=5000 --log_dir=$run/logs --html=validate $run/examples"]
2325

2426
[progress history]
2527
[local history=$LUX_EXTRA_LOGS/$LUX_SHELLNAME/history]
2628
[invoke eval 0 "mv $run $history"]
2729
[invoke eval 0 "rm -rf $history/examples"]
28-
[invoke eval 0 "../bin/lux --html=validate --history $history/logs"]
30+
[invoke eval 0 "$${LUX_BIN}/lux --html=validate --history $history/logs"]
2931

3032
[shell multi]
3133
[progress multi]
@@ -40,22 +42,22 @@
4042
[progress run1]
4143
[invoke eval 0 "cp $run/src/success/success.lux $run/src/mix/worse.lux"]
4244
[invoke eval 0 "cp $run/src/fail/fail.lux $run/src/mix/better.lux"]
43-
[invoke eval 0 "../bin/lux --progress=summary --timeout=5000 --log_dir=$run/logs/success1 --run=run1 --revision=rev1 --suite=success --html=validate $run/src/success"]
44-
[invoke eval 1 "../bin/lux --progress=summary --timeout=5000 --log_dir=$run/logs/fail1 --run=run1 --revision=rev1 --extend_run --suite=fail --html=validate $run/src/fail"]
45-
[invoke eval 1 "../bin/lux --progress=summary --timeout=5000 --log_dir=$run/logs/mix1 --run=run1 --revision=rev1 --extend_run --suite=mix --html=validate $run/src/mix"]
45+
[invoke eval 0 "$${LUX_BIN}/lux --progress=summary --timeout=5000 --log_dir=$run/logs/success1 --run=run1 --revision=rev1 --suite=success --html=validate $run/src/success"]
46+
[invoke eval 1 "$${LUX_BIN}/lux --progress=summary --timeout=5000 --log_dir=$run/logs/fail1 --run=run1 --revision=rev1 --extend_run --suite=fail --html=validate $run/src/fail"]
47+
[invoke eval 1 "$${LUX_BIN}/lux --progress=summary --timeout=5000 --log_dir=$run/logs/mix1 --run=run1 --revision=rev1 --extend_run --suite=mix --html=validate $run/src/mix"]
4648

4749
[progress run2]
4850
[invoke eval 0 "cp $run/src/fail/fail.lux $run/src/mix/worse.lux"]
4951
[invoke eval 0 "cp $run/src/success/success.lux $run/src/mix/better.lux"]
50-
[invoke eval 0 "../bin/lux --progress=summary --timeout=5000 --log_dir=$run/logs/success2 --run=run2 --revision=rev2 --suite=success --html=validate $run/src/success"]
51-
[invoke eval 1 "../bin/lux --progress=summary --timeout=5000 --log_dir=$run/logs/fail2 --run=run2 --revision=rev2 --extend_run --suite=fail --html=validate $run/src/fail"]
52-
[invoke eval 1 "../bin/lux --progress=summary --timeout=5000 --log_dir=$run/logs/mix2 --run=run2 --revision=rev2 --extend_run --suite=mix --html=validate $run/src/mix"]
52+
[invoke eval 0 "$${LUX_BIN}/lux --progress=summary --timeout=5000 --log_dir=$run/logs/success2 --run=run2 --revision=rev2 --suite=success --html=validate $run/src/success"]
53+
[invoke eval 1 "$${LUX_BIN}/lux --progress=summary --timeout=5000 --log_dir=$run/logs/fail2 --run=run2 --revision=rev2 --extend_run --suite=fail --html=validate $run/src/fail"]
54+
[invoke eval 1 "$${LUX_BIN}/lux --progress=summary --timeout=5000 --log_dir=$run/logs/mix2 --run=run2 --revision=rev2 --extend_run --suite=mix --html=validate $run/src/mix"]
5355

5456
[progress history]
5557
[progress cd $PWD]
56-
[progress \n../bin/lux --html=validate --history $run/logs]
58+
[progress \n$${LUX_BIN}/lux --html=validate --history $run/logs]
5759
[progress \nopen file://$run/logs/lux_history.html\n]
58-
[invoke eval 0 "../bin/lux --html=validate --history $run/logs"]
60+
[invoke eval 0 "$${LUX_BIN}/lux --html=validate --history $run/logs"]
5961

6062
#-success.lux|better.lux|No failing test cases
6163
-success.lux|No failing test cases

test/merge.delux

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
### TEST CALC
2020
[progress test calc]
2121
[invoke eval $OK "mkdir -p $orig_calc_dir"]
22-
!../bin/lux --progress=summary \
22+
!$${LUX_BIN}/lux --progress=summary \
2323
--log_dir=$orig_calc_dir \
2424
--case_prefix=orig/case/prefix/ \
2525
--html=validate \
@@ -33,7 +33,7 @@
3333
### TEST INTRO
3434
[progress test intro]
3535
[invoke eval $OK "mkdir -p $orig_intro_dir"]
36-
!../bin/lux --progress=summary \
36+
!$${LUX_BIN}/lux --progress=summary \
3737
--log_dir=$orig_intro_dir \
3838
--case_prefix=orig/case/prefix/ \
3939
--html=validate \
@@ -46,7 +46,7 @@
4646

4747
### ANNOTATE CALC w/ new case_prefix
4848
[progress annotate calc]
49-
!../bin/lux --case_prefix=new/case/prefix/ \
49+
!$${LUX_BIN}/lux --case_prefix=new/case/prefix/ \
5050
--html=validate \
5151
--annotate=$new_calc_dir/lux_summary.log
5252
[invoke check_status $OK]
@@ -56,7 +56,7 @@
5656

5757
### ANNOTATE INTRO - w/o re-using old case_prefix
5858
[progress annotate intro]
59-
!../bin/lux --html=validate \
59+
!$${LUX_BIN}/lux --html=validate \
6060
--annotate=$new_intro_dir/lux_summary.log
6161
[invoke check_status $OK]
6262
!cat $new_intro_dir/lux_summary.log.html | grep examples
@@ -65,7 +65,7 @@
6565

6666
### MERGE
6767
[progress merge]
68-
!../bin/lux --html=validate \
68+
!$${LUX_BIN}/lux --html=validate \
6969
--merge $merge_dir $new_calc_dir $new_intro_dir
7070
[invoke check_status $OK]
7171
!cat $merge_dir/lux_summary.log.html | grep examples
@@ -75,6 +75,6 @@
7575

7676
### HISTORY
7777
[progress history]
78-
!../bin/lux --html=validate \
78+
!$${LUX_BIN}/lux --html=validate \
7979
--history $history_dir $merge_dir
8080
[invoke check_status $OK]

test/misc.delux

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[shell test]
88
[invoke eval $OK "rm -rf delux_logs"]
9-
!lux --timeout=5000 --log_dir=delux_logs --html=validate misc
9+
!$${LUX_BIN}/lux --timeout=5000 --log_dir=delux_logs --html=validate misc
1010

1111
"""?
1212
foo

test/plain.delux

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[shell test]
66
-LUX ERROR
77
[invoke eval $OK "mkdir -p $LUX_EXTRA_LOGS/$LUX_SHELLNAME"]
8-
!../bin/lux --progress=summary --timeout=5000 \
8+
!$${LUX_BIN}/lux --progress=summary --timeout=5000 \
99
--log_dir=$LUX_EXTRA_LOGS/$LUX_SHELLNAME --html=validate plain
1010
"""?
1111
test case : .*plain/nested_fail_html.lux

test/tutorial/basic_infra.delux

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
-${fail_pattern}
2121

2222
[invoke eval "cd ${tutorial_dir}/chatty/test/intro"]
23-
[invoke eval "lux *.delux"]
23+
[invoke eval "$${LUX_BIN}/lux *.delux"]
2424

2525
[shell intro]
2626
[progress intro]
2727
[timeout 60]
2828
# -${fail_pattern}
2929

3030
[invoke eval "cd ${tutorial_dir}/chatty/test/intro"]
31-
!make test < /dev/null
31+
!PATH="$${LUX_BIN}:$PATH" make test < /dev/null
3232
???test case : a_simple_server.lux
3333
???result : SUCCESS
3434
???test case : async_startup_fail.lux
@@ -45,7 +45,7 @@
4545
# -${fail_pattern}
4646

4747
[invoke eval "cd ${tutorial_dir}/chatty/test/infra"]
48-
!make test < /dev/null
48+
!PATH="$${LUX_BIN}:$PATH" make test < /dev/null
4949
???test case : noise.lux
5050
???result :
5151
???test case : skip.lux
@@ -67,10 +67,10 @@
6767
[invoke eval "cd ${tutorial_dir}/chatty/test/infra"]
6868
[invoke eval "rm -rf lux_history.* lux_logs"]
6969
[loop i 1..5]
70-
[invoke eval_any "make test"]
70+
[invoke eval_any "PATH=$${LUX_BIN}:$PATH make test"]
7171
[endloop]
7272

73-
!make history < /dev/null
73+
!PATH="$${LUX_BIN}:$PATH" make history < /dev/null
7474
!echo ===$$?===
7575
?^===0===
7676
?^SH-PROMPT:

test/tutorial/history_demo.delux

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
-HTML ERROR
2222

2323
[invoke eval "cd ${tutorial_dir}/chatty/test/infra"]
24-
!${validate} make history_demo_multi_branch < /dev/null
24+
!${validate} PATH="$${LUX_BIN}:$PATH" make history_demo_multi_branch < /dev/null
2525
!echo ===$$?===
2626
?^===0===
2727
?^SH-PROMPT:
@@ -41,7 +41,7 @@
4141

4242
-HTML ERROR
4343
[invoke eval "cd ${tutorial_dir}/chatty/test/infra"]
44-
!${validate} make history_demo_multi_host < /dev/null
44+
!${validate} PATH="$${LUX_BIN}:$PATH" make history_demo_multi_host < /dev/null
4545

4646
!echo ===$$?===
4747
?^===0===
@@ -81,7 +81,7 @@
8181
-HTML ERROR
8282

8383
[invoke eval "cd ${tutorial_dir}/chatty/test/infra"]
84-
!${validate} make history_demo_single < /dev/null
84+
!${validate} PATH="$${LUX_BIN}:$PATH" make history_demo_single < /dev/null
8585
!echo ===$$?===
8686
?^===0===
8787
?^SH-PROMPT:
@@ -99,7 +99,7 @@
9999
[timeout 60]
100100

101101
[invoke eval "cd ${tutorial_dir}/chatty/test/infra"]
102-
!${validate} make history_demo_success < /dev/null
102+
!${validate} PATH="$${LUX_BIN}:$PATH" make history_demo_success < /dev/null
103103
!echo ===$$?===
104104
?^===0===
105105
?^SH-PROMPT:
@@ -116,7 +116,7 @@
116116
-HTML ERROR
117117

118118
[invoke eval "cd ${tutorial_dir}/chatty/test/infra"]
119-
!${validate} make history_demo_warning < /dev/null
119+
!${validate} PATH="$${LUX_BIN}:$PATH" make history_demo_warning < /dev/null
120120
!echo ===$$?===
121121
?^===0===
122122
?^SH-PROMPT:
@@ -135,7 +135,7 @@
135135
-HTML ERROR
136136

137137
[invoke eval "cd ${tutorial_dir}/chatty/test/infra"]
138-
!${validate} make history_demo_empty < /dev/null
138+
!${validate} PATH="$${LUX_BIN}:$PATH" make history_demo_empty < /dev/null
139139
!echo ===$$?===
140140
?^===0===
141141
?^SH-PROMPT:

test/xref.delux

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
-$fail_pattern
77

88
[timeout 30]
9-
[invoke eval $OK "../bin/lux --xref"]
9+
[invoke eval $OK "$${LUX_BIN}/lux --xref"]

tutorial/chatty/test/intro/a_simple_server.delux

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
!rm -rf tmp_logs
55
?SH-PROMPT:
66

7-
!lux -d --log_dir=tmp_logs a_simple_server.lux
7+
!$${LUX_BIN}/lux -d --log_dir=tmp_logs a_simple_server.lux
88
?Debugger for lux. Try help or continue.
99

1010
!c 15

0 commit comments

Comments
 (0)