Skip to content

Commit

Permalink
Create arch integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
yungsters committed Aug 14, 2023
1 parent babc2c5 commit 618aa18
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/arch/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -eo pipefail

THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
: "${NODE_BIN:=node}"

if [ "$(/usr/bin/arch)" != "arm64" ]; then
echo "arch/run.sh: This must be run on Apple Silicon." >&2
exit
fi

# shellcheck disable=SC2016
"$NODE_BIN" "$THIS_DIR/yarn.js" config get init.author.name >/dev/null
/usr/bin/arch -x86_64 "$NODE_BIN" "$THIS_DIR/yarn.js" config get init.author.name >/dev/null

echo "Success!"
4 changes: 4 additions & 0 deletions test/arch/yarn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
'use strict';

require ('../../v8-compile-cache.js');
require('yarn/lib/cli.js');

0 comments on commit 618aa18

Please sign in to comment.