-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from LedgerHQ/fix-tests
Fix tests
- Loading branch information
Showing
21 changed files
with
691 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
# FILL THESE WITH YOUR OWN SDKs PATHS and APP-ETHEREUM's ROOT | ||
# NANOS_SDK= | ||
# NANOX_SDK= | ||
# APP_ETHEREUM= | ||
|
||
# create elfs folder if it doesn't exist | ||
mkdir -p elfs | ||
|
||
# move to repo's root to build apps | ||
cd .. | ||
|
||
echo "*Building elfs for Nano S..." | ||
|
||
echo "**Building app-paraswap for Nano S..." | ||
make clean BOLOS_SDK=$NANOS_SDK | ||
make -j DEBUG=1 BOLOS_SDK=$NANOS_SDK | ||
cp bin/app.elf "tests/elfs/paraswap_nanos.elf" | ||
|
||
echo "**Building app-ethereum for Nano S..." | ||
cd $APP_ETHEREUM | ||
make clean BOLOS_SDK=$NANOS_SDK | ||
make -j DEBUG=1 BOLOS_SDK=$NANOS_SDK CHAIN=ethereum | ||
cd - | ||
cp "${APP_ETHEREUM}/bin/app.elf" "tests/elfs/ethereum_nanos.elf" | ||
|
||
|
||
echo "*Building elfs for Nano X..." | ||
|
||
echo "**Building app-paraswap for Nano X..." | ||
make clean BOLOS_SDK=$NANOX_SDK | ||
make -j DEBUG=1 BOLOS_SDK=$NANOX_SDK | ||
cp bin/app.elf "tests/elfs/paraswap_nanox.elf" | ||
|
||
echo "**Building app-ethereum for Nano X..." | ||
cd $APP_ETHEREUM | ||
make clean BOLOS_SDK=$NANOX_SDK | ||
make -j DEBUG=1 BOLOS_SDK=$NANOX_SDK CHAIN=ethereum | ||
cd - | ||
cp "${APP_ETHEREUM}/bin/app.elf" "tests/elfs/ethereum_nanox.elf" | ||
|
||
echo "done" |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import expect from 'expect' | ||
|
||
expect.extend({ | ||
toMatchSnapshot(received, original) { | ||
|
||
if(received.data.equals(original.data)){ | ||
return { | ||
message: () => `snapshots are equal`, | ||
pass: true | ||
} | ||
} else { | ||
console.log("snapshots are not equal") | ||
return { | ||
message: () => `snapshots are not equal`, | ||
pass: false | ||
} | ||
} | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const sim_options_nanos = { | ||
model: "nanos", | ||
logging: true, | ||
start_delay: 2000, | ||
X11: true, | ||
custom: "", | ||
}; | ||
|
||
const sim_options_nanox = { | ||
model: "nanox", | ||
logging: true, | ||
start_delay: 2000, | ||
X11: true, | ||
custom: "", | ||
}; | ||
|
||
const Resolve = require("path").resolve; | ||
const NANOS_ETH_ELF_PATH = Resolve("elfs/ethereum_nanos.elf"); | ||
const NANOX_ETH_ELF_PATH = Resolve("elfs/ethereum_nanox.elf"); | ||
const NANOS_PARASWAP_LIB = { Paraswap: Resolve("elfs/paraswap_nanos.elf") }; | ||
const NANOX_PARASWAP_LIB = { Paraswap: Resolve("elfs/paraswap_nanox.elf") }; | ||
|
||
const TIMEOUT = 1000000; | ||
|
||
module.exports = { | ||
NANOS_ETH_ELF_PATH, | ||
NANOX_ETH_ELF_PATH, | ||
NANOS_PARASWAP_LIB, | ||
NANOX_PARASWAP_LIB, | ||
sim_options_nanos, | ||
sim_options_nanox, | ||
TIMEOUT, | ||
} |
Oops, something went wrong.