Rln-relay/contract dependencies (#349)

* adds the script to detect os

* comments out the os detection code

* detects os

* adds ganache installation and termination

* updates the contract test

* adds rln-relay test to the waku v2 tests

* updates test_web3 comment
This commit is contained in:
Sanaz Taheri Boshrooyeh 2021-02-04 11:30:00 -08:00 committed by GitHub
parent 85ffaea518
commit 666f9faf09
3 changed files with 50 additions and 30 deletions

View File

@ -105,9 +105,27 @@ example2: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim example2 $(NIM_PARAMS) waku.nims
test2: | build deps
# detecting the os
ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10...
detected_OS := Windows
else ifeq ($(strip $(shell uname)),Darwin)
detected_OS := macOS
else
# e.g. Linux
detected_OS := $(strip $(shell uname))
endif
installganache:
npm install ganache-cli; npx ganache-cli -p 8540 -g 0 -l 3000000000000&
test2: | build deps installganache
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim test2 $(NIM_PARAMS) waku.nims
# the following command (pkill -f ganache-cli) attempts to kill ganache-cli process on macos
# if we do not kill the process then it would hang there and causes issue in GitHub Actions macos job (the job never finsihes)
(([[ $(detected_OS) = macOS ]] && \
pkill -f ganache-cli) || true)
scripts2: | build deps wakunode2
echo -e $(BUILD_MSG) "build/$@" && \

View File

@ -11,5 +11,5 @@ import
./v2/test_message_store,
./v2/test_jsonrpc_waku,
./v2/test_peer_manager,
./v2/test_web3 # will remove it when rln-relay tests get added
# TODO ./v2/test_waku_rln_relay
./v2/test_web3, # TODO remove it when rln-relay tests get finalized
./v2/test_waku_rln_relay

File diff suppressed because one or more lines are too long