-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathhermes.sh
executable file
·47 lines (39 loc) · 1.3 KB
/
hermes.sh
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
#!/bin/bash
OS="$(uname -s)"
case "$OS" in
Linux*)
OS_DIR="linux64-bin"
;;
Darwin*)
OS_DIR="osx-bin"
;;
CYGWIN*|MINGW*|MSYS*)
OS_DIR="win64-bin"
;;
*)
echo "Unsupported OS: $OS"
exit 1
;;
esac
# Paths relative to 'packages/ses'
HERMESC="../../node_modules/hermes-engine-cli/$OS_DIR/hermesc"
HERMES="../../node_modules/hermes-engine-cli/$OS_DIR/hermes"
echo "Catenating: dist/ses-hermes.cjs + test/hermes-smoke.js"
cat dist/ses-hermes.cjs test/hermes-smoke.js > test/hermes-smoke-dist.js
echo "Generated: test/hermes-smoke-dist.js"
# Errors on async arrow functions and async generators
# Both are unsupported on Hermes
echo "Executing: test/hermes-smoke-dist.js on Hermes compiler"
$HERMESC test/hermes-smoke-dist.js -emit-binary -out test/hermes-smoke-dist.hbc
echo "Generated: test/hermes-smoke-dist.hbc"
echo "Hermes compiler done"
# TODO: Disabled until /~https://github.com/endojs/endo/issues/1891 complete
# echo "Executing generated bytecode file on Hermes VM"
# $HERMES -b test/hermes-smoke-dist.hbc
# echo "Hermes VM done"
echo "Skipping: Hermes VM"
echo "Hermes tests complete"
echo "Removing: test/hermes-smoke-dist.js"
rm test/hermes-smoke-dist.js
echo "Removing: test/hermes-smoke-dist.hbc"
rm test/hermes-smoke-dist.hbc