mirror of
https://github.com/status-im/status-lib.git
synced 2025-01-12 21:44:57 +00:00
5285cf7d8c
abstract backend; add mock backend and testing move bookmarks to backend wrapper move bookmarks to backend wrapper move bookmarks to backend wrapper working version cleanup add mock backend add nimble task & test folder add evn.sh make test run; implement bookmark method in the mock add nim unit test removing duplicated statement that was causing tests to run twice re-enable other initilizations in the status object; support specifying backend in the constructor update bookmark test update bookmark test update nimble and makefile update nimble and makefile update bookmarks test remove old browser file
53 lines
1.5 KiB
Nim
53 lines
1.5 KiB
Nim
mode = ScriptMode.Verbose
|
|
|
|
version = "0.1.0"
|
|
author = "Status Research & Development GmbH"
|
|
description = "WIP refactor to extract business logic from status-desktop into a reusable library"
|
|
license = "MIT"
|
|
skipDirs = @["test"]
|
|
|
|
requires "nim >= 1.2.0"
|
|
|
|
import strutils
|
|
|
|
const release_opts =
|
|
" --define:danger" &
|
|
" --define:strip" &
|
|
" --hints:off" &
|
|
" --opt:size" &
|
|
" --passC:-flto" &
|
|
" --passL:-flto"
|
|
|
|
const debug_opts =
|
|
" --debugger:native" &
|
|
" --define:chronicles_line_numbers" &
|
|
" --define:debug" &
|
|
" --linetrace:on" &
|
|
" --stacktrace:on"
|
|
|
|
proc buildAndRun(name: string,
|
|
srcDir = "test_nim/",
|
|
outDir = "test_nim/build/",
|
|
params = "",
|
|
cmdParams = "",
|
|
lang = "c") =
|
|
mkDir outDir
|
|
exec "nim " &
|
|
lang &
|
|
(if getEnv("RELEASE").strip != "false": release_opts else: debug_opts) &
|
|
" --define:ssl" &
|
|
" --passL:" & getEnv("STATUSGO") & "" &
|
|
# " --passL:" & "vendor/status-go/build/bin/libstatus.dylib" & "" &
|
|
" --out:" & outDir & name &
|
|
" " &
|
|
srcDir & name & ".nim"
|
|
if defined(macosx):
|
|
exec "install_name_tool -add_rpath " & getEnv("STATUSGO_LIBDIR") & " " & outDir & name
|
|
exec "install_name_tool -change " & "libstatus." & getEnv("LIBSTATUS_EXT") & " @rpath/libstatus." & getEnv("LIBSTATUS_EXT") & " " & outDir & name
|
|
if getEnv("RUN_AFTER_BUILD").strip != "false":
|
|
exec outDir & name
|
|
|
|
task tests, "Build and run all tests":
|
|
rmDir "test_nim/build/"
|
|
buildAndRun "test_all"
|