fix(nim-tests): split tests into individual targets (#16546)

* fix(nim-tests): split tests into individual targets

Otherwise combining separate `nim` calls with `;` results in only the
last one informing `make` call what exit code the hole target had.

Resolves:
https://github.com/status-im/status-desktop/issues/16545

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* test: fix message_model test

* fix; Update default sorting for assets and collectibles (#16552)

* chore(status-go): bump status-go to latest (#16559)

* test: fix collectibles_model test

---------

Signed-off-by: Jakub Sokołowski <jakub@status.im>
Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
Co-authored-by: Cuteivist <emil.sawicki9@gmail.com>
Co-authored-by: Dario Gabriel Lipicar <dario@status.im>
This commit is contained in:
Jakub Sokołowski 2024-10-21 20:49:17 +02:00 committed by GitHub
parent 3648facd4e
commit 5a97b034e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 6 deletions

View File

@ -851,9 +851,12 @@ run-windows: compile_windows_resources nim_status_client $(NIM_WINDOWS_PREBUILT_
./bin/nim_status_client.exe $(ARGS)
NIM_TEST_FILES := $(wildcard test/nim/*.nim)
NIM_TESTS := $(foreach test_file,$(NIM_TEST_FILES),nim-test-run/$(test_file))
tests-nim-linux: | dotherside
LD_LIBRARY_PATH="$(QT5_LIBDIR):$(LD_LIBRARY_PATH)" \
$(foreach nimfile,$(NIM_TEST_FILES),$(ENV_SCRIPT) nim c $(NIM_PARAMS) $(NIM_EXTRA_PARAMS) -r $(nimfile);)
nim-test-run/%: | dotherside
LD_LIBRARY_PATH="$(QT5_LIBDIR):$(LD_LIBRARY_PATH)" $(ENV_SCRIPT) \
nim c $(NIM_PARAMS) $(NIM_EXTRA_PARAMS) -r $(subst nim-test-run/,,$@)
tests-nim-linux: $(NIM_TESTS)
endif # "variables.mk" was not included

View File

@ -44,7 +44,7 @@ pipeline {
environment {
PLATFORM = 'tests/nim'
/* Improve make performance */
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
/* Makefile assumes the compiler folder is included */
QTDIR = "/opt/qt/5.15.2/gcc_64"
/* Avoid weird bugs caused by stale cache. */
@ -62,7 +62,9 @@ pipeline {
}
stage('Tests') {
steps { sh 'make tests-nim-linux' }
steps {
sh 'make tests-nim-linux V=1'
}
}
}

View File

@ -396,7 +396,7 @@ QtObject:
result.extradata = extradata
result.generatedId = result.id.toString()
result.generatedCollectionId = result.id.contractID.toString()
result.tokenType = contractTypeToTokenType(data.contractType.get())
result.tokenType = contractTypeToTokenType(data.contractType.get(ContractType.ContractTypeUnknown))
result.setup()
proc newCollectibleDetailsBasicEntry*(id: backend.CollectibleUniqueID, extradata: ExtraData): CollectiblesEntry =

View File

@ -12,6 +12,7 @@ proc createTestMessageItem(id: string, clock: int64): Item =
return initItem(
id = id,
communityId = "",
chatId = "",
responseToMessageWithId = "",
senderId = "",
senderDisplayName = "",
@ -60,6 +61,7 @@ proc createTestMessageItem(id: string, clock: int64): Item =
albumMessageIds = @[],
albumImagesCount = 0,
bridgeMessage = BridgeMessage(),
quotedBridgeMessage = BridgeMessage(),
)
let message0_chatIdentifier = createTestMessageItem("chat-identifier", -2)