mirror of
https://github.com/waku-org/js-waku.git
synced 2025-01-14 06:24:27 +00:00
test: parameterize waku service node dir/bin
This commit is contained in:
parent
cd665a1803
commit
5f4e14e56c
@ -22,8 +22,11 @@ import waitForLine from "./log_file";
|
|||||||
|
|
||||||
const dbg = debug("waku:nwaku");
|
const dbg = debug("waku:nwaku");
|
||||||
|
|
||||||
const NIM_WAKU_DIR = appRoot + "/nwaku";
|
const WAKU_SERVICE_NODE_DIR =
|
||||||
const NIM_WAKU_BIN = NIM_WAKU_DIR + "/build/wakunode2";
|
process.env.WAKU_SERVICE_NODE_DIR ?? appRoot + "/nwaku";
|
||||||
|
const WAKU_SERVICE_NODE_BIN =
|
||||||
|
process.env.WAKU_SERVICE_NODE_BIN ??
|
||||||
|
WAKU_SERVICE_NODE_DIR + "/build/wakunode2";
|
||||||
const NODE_READY_LOG_LINE = "Node setup complete";
|
const NODE_READY_LOG_LINE = "Node setup complete";
|
||||||
|
|
||||||
const LOG_DIR = "./log";
|
const LOG_DIR = "./log";
|
||||||
@ -142,8 +145,8 @@ export class Nwaku {
|
|||||||
|
|
||||||
const argsArray = argsToArray(mergedArgs);
|
const argsArray = argsToArray(mergedArgs);
|
||||||
dbg(`nwaku args: ${argsArray.join(" ")}`);
|
dbg(`nwaku args: ${argsArray.join(" ")}`);
|
||||||
this.process = spawn(NIM_WAKU_BIN, argsArray, {
|
this.process = spawn(WAKU_SERVICE_NODE_BIN, argsArray, {
|
||||||
cwd: NIM_WAKU_DIR,
|
cwd: WAKU_SERVICE_NODE_DIR,
|
||||||
stdio: [
|
stdio: [
|
||||||
"ignore", // stdin
|
"ignore", // stdin
|
||||||
logFile, // stdout
|
logFile, // stdout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user