I'm a little confused about how SRCDIR works in the testsuite files, and also about which of the Process.*-functions I should use. I'm trying with
test_do([[ object p = Process.Process(RUNPIKE + " "SRCDIR/https.pike""); sleep(5); /* Wait a little for the server to startup */ [...]
but that fails with
Pike: Couldn't find script to execute ("/home/nisse/hack/pike/build/linux-2.4.18nisse-i686/SRCDIR/https.pike")
/ Niels Möller (ny flexiblare bröstkorg)
Previous text:
2003-04-15 13:51: Subject: Starting new pike processes from the testsuite
Would something like this work?
test_do([[ object p = Process.spawn(RUNPIKE, "SRCDIR/https.pike"); sleep(5); /* Wait a little for the server to startup */ HTTP.Query q = HTTP.get_url("https://localhost:25678"); if (q->status != 200 || search("html", q->data()) < 0) error("Failed\n"); p->kill(); ]])
The sleep is ugly, perhaps one could hack https.pike to send some signal to its parent once it has bound the port.
/ Niels Möller (ny flexiblare bröstkorg)