1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
(executables
(names cat md5)
(modes
js
(best exe)))
(rule
(target cat-native.stdout)
(action
(with-stdout-to
%{target}
(pipe-stdout
(run printf "echo ☠")
(run %{dep:./cat.exe})))))
(rule
(target cat-js.stdout)
(action
(with-stdout-to
%{target}
(pipe-stdout
(run printf "echo ☠")
(run node %{dep:./cat.bc.js})))))
(rule
(alias runtest)
(action
(diff cat-js.stdout cat-native.stdout)))
(rule
(target md5-native.stdout)
(action
(with-stdout-to
%{target}
(progn
(run %{dep:md5.exe} %{dep:md5.bc.js})
(run %{dep:md5.exe} %{dep:md5.bc.js} %{dep:md5.bc.js})
(run %{dep:md5.exe} -offset 2000 -length 4000 %{dep:md5.bc.js})
(pipe-stdout
(echo "tests")
(run %{dep:md5.exe}))
(pipe-stdout
(echo "teststeststests")
(run %{dep:md5.exe} -offset 5 -length 5))
(pipe-stdout
(echo "teststeststests")
(run %{dep:md5.exe} -offset 2 -length 5))))))
(rule
(target md5-js.stdout)
(action
(with-stdout-to
%{target}
(progn
(run node %{dep:md5.bc.js} %{dep:md5.bc.js})
(run node %{dep:md5.bc.js} %{dep:md5.bc.js} %{dep:md5.bc.js})
(run node %{dep:md5.bc.js} -offset 2000 -length 4000 %{dep:md5.bc.js})
(pipe-stdout
(echo "tests")
(run node %{dep:md5.bc.js}))
(pipe-stdout
(echo "teststeststests")
(run node %{dep:md5.bc.js} -offset 5 -length 5))
(pipe-stdout
(echo "teststeststests")
(run node %{dep:md5.bc.js} -offset 2 -length 5))))))
(rule
(alias runtest)
(action
(diff md5-js.stdout md5-native.stdout)))
|