Skip to content

Commit

Permalink
add compilation flag for textual
Browse files Browse the repository at this point in the history
  • Loading branch information
chcmedeiros committed Mar 6, 2024
1 parent e0af516 commit 3f198df
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ target_link_libraries(unittests PRIVATE

add_compile_definitions(TESTVECTORS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/tests/")
add_compile_definitions(APP_TESTING=1)
add_compile_definitions(COMPILE_TEXTUAL=1)
add_test(unittests ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittests)
set_tests_properties(unittests PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests)

Expand Down
4 changes: 4 additions & 0 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ ifndef ICONNAME
$(error ICONNAME is not set)
endif

ifneq ($(TARGET_NAME),TARGET_NANOS)
CFLAGS += -DCOMPILE_TEXTUAL
endif

include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.platform
CFLAGS += -I$(MY_DIR)/../deps/tinycbor/src
APP_SOURCE_PATH += $(MY_DIR)/../deps/tinycbor-ledger
Expand Down
24 changes: 24 additions & 0 deletions tests_zemu/tests/textual.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jest.setTimeout(90000)
describe('Textual', function () {
// eslint-disable-next-line jest/expect-expect
test.concurrent.each(DEVICE_MODELS)('can start and stop container', async function (m) {
if (m.name === 'nanos') {

This comment has been minimized.

Copy link
@ftheirs

ftheirs Mar 11, 2024

Contributor

you can define DEVICE_MODELS again and remove NanoS or maybe you can just use the DEVICE_MODELS and remove the first element

// Skip the test for the nanos device
return;
}
const sim = new Zemu(m.path)
try {
await sim.start({ ...defaultOptions, model: m.name })
Expand All @@ -38,6 +42,10 @@ describe('Textual', function () {
})

test.concurrent.each(DEVICE_MODELS)('sign basic textual', async function (m) {
if (m.name === 'nanos') {
// Skip the test for the nanos device
return;
}
const sim = new Zemu(m.path)
try {
await sim.start({ ...defaultOptions, model: m.name })
Expand Down Expand Up @@ -84,6 +92,10 @@ describe('Textual', function () {
})

test.concurrent.each(DEVICE_MODELS)('sign basic textual expert', async function (m) {
if (m.name === 'nanos') {
// Skip the test for the nanos device
return;
}
const sim = new Zemu(m.path)
try {
await sim.start({ ...defaultOptions, model: m.name })
Expand Down Expand Up @@ -133,6 +145,10 @@ describe('Textual', function () {
})

test.concurrent.each(DEVICE_MODELS)('sign basic textual eth ', async function (m) {
if (m.name === 'nanos') {
// Skip the test for the nanos device
return;
}
const sim = new Zemu(m.path)
try {
await sim.start({ ...defaultOptions, model: m.name })
Expand Down Expand Up @@ -182,6 +198,10 @@ describe('Textual', function () {
})

test.concurrent.each(DEVICE_MODELS)('sign basic textual eth warning ', async function (m) {
if (m.name === 'nanos') {
// Skip the test for the nanos device
return;
}
const sim = new Zemu(m.path)
try {
await sim.start({ ...defaultOptions, model: m.name })
Expand Down Expand Up @@ -228,6 +248,10 @@ describe('Textual', function () {
})

test.concurrent.each(DEVICE_MODELS)('sign basic textual evmos ', async function (m) {
if (m.name === 'nanos') {
// Skip the test for the nanos device
return;
}
const sim = new Zemu(m.path)
try {
await sim.start({ ...defaultOptions, model: m.name })
Expand Down

0 comments on commit 3f198df

Please sign in to comment.