Skip to content

Commit df4bc1e

Browse files
committed
[fix] Fetch correct nodeos-barebones architecture for pretest script
1 parent 620665b commit df4bc1e

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
"nodeos-nodejs",
2828
"usrbinenv"
2929
],
30+
"testDependencies": [
31+
"nodeos-barebones",
32+
"qemu",
33+
"suppose"
34+
],
3035
"devDependencies": {
3136
"exclfs": "piranna/exclfs",
3237
"jocker": "^0.0.0",

scripts/BigRedButton

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ BUILD="npm run build --no-spin"
1010
TEST="npm test"
1111

1212

13-
eval MACHINE=pc BITS=32 $BUILD && MACHINE=pc BITS=32 $TEST || exit 1
14-
eval MACHINE=pc BITS=64 $BUILD && MACHINE=pc BITS=64 $TEST || exit 2
15-
eval MACHINE=raspi2 $BUILD || exit 3
13+
eval MACHINE=pc BITS=32 $BUILD && MACHINE=pc BITS=32 $TEST || exit 1
14+
eval MACHINE=pc BITS=64 $BUILD && MACHINE=pc BITS=64 $TEST || exit 2
15+
eval MACHINE=raspi2 $BUILD || exit 3
1616

1717

1818
#

scripts/build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ PATH=$TOOLCHAIN/bin:$PATH
2222
(
2323
cd $TOOLCHAIN
2424

25+
# We can't use `--arch=$NODE_ARCH` because `prebuild` would install a
26+
# cross-compiler for a diferent host platform, so we set the desired target
27+
# platform using environment variables instead
2528
BITS=$BITS CPU=$CPU MACHINE=$MACHINE npm install --production || exit 1
2629
) || exit $?
2730

scripts/pretest

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
#!/usr/bin/env bash
22

3+
TOOLCHAIN=`node -p "require('nodeos-cross-toolchain')"`
4+
BAREBONES=`node -p "require('nodeos-barebones')"`
35

4-
npm install nodeos-barebones qemu suppose
56

6-
cd `node -p "require('nodeos-barebones')"`
7+
source $TOOLCHAIN/scripts/adjustEnvVars.sh || exit $?
78

8-
npm install --production
9+
10+
buildDependencies testDependencies || exit 1
11+
12+
(
13+
cd $BAREBONES || exit 2
14+
15+
npm install --arch=$NODE_ARCH --production || exit 3
16+
) || exit $?

0 commit comments

Comments
 (0)