Skip to content

Commit

Permalink
fix: added nanox e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
n4l5u0r committed Mar 4, 2022
1 parent f71405f commit d8a2d3a
Show file tree
Hide file tree
Showing 32 changed files with 25,089 additions and 1,029 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Install node
uses: actions/setup-node@v2
with:
node-version: "14.4.0"
node-version: "16.4.0"
- name: Install yarn
run: |
npm install -g yarn
Expand Down
8 changes: 1 addition & 7 deletions src/handle_provide_parameter.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
#include "poap_plugin.h"

// Copies the whole parameter (32 bytes long) from `src` to `dst`.
// Useful for numbers, data...
static void copy_parameter(uint8_t *dst, uint8_t *src) {
memcpy(dst, src, PARAMETER_LENGTH);
}

// Copy token sent parameter to token_id
static void handle_token(const ethPluginProvideParameter_t *msg, context_t *context) {
copy_parameter(context->token_id, msg->parameter);
copy_parameter(context->token_id, msg->parameter, PARAMETER_LENGTH);
}

static void handle_beneficiary(const ethPluginProvideParameter_t *msg, context_t *context) {
Expand Down
16 changes: 16 additions & 0 deletions tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
env: {
es2021: true,
node: true,
jest: true,
},
extends: ["eslint:recommended"],
parserOptions: {
sourceType: "module",
},
rules: {
"linebreak-style": ["error", "unix"],
semi: ["error", "always"],
},
};

Binary file modified tests/elfs/ethereum_nanos.elf
Binary file not shown.
Binary file modified tests/elfs/ethereum_nanox.elf
Binary file not shown.
Binary file modified tests/elfs/poap_nanos.elf
Binary file not shown.
Binary file modified tests/elfs/poap_nanox.elf
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/globalsetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ module.exports = async () => {
await catchExit();
await Zemu.checkAndPullImage();
await Zemu.stopAllEmuContainers();
fsExtra.emptyDirSync("snapshots/tmp")
fsExtra.emptyDirSync("snapshots/tmp");
};
Loading

0 comments on commit d8a2d3a

Please sign in to comment.