Files
libite/test/runbg.c
T
Joachim Wiberg 6c53ee819b test: adjust times again
Running the tests in a Debian container seem to be taking way too long.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-09-17 12:26:08 +02:00

24 lines
407 B
C

#include "check.h"
#define file "/tmp/runbg.txt"
int main(void)
{
char *cmd[] = {
"sh", "-c", "echo 'hello world' > " file, NULL
};
erase(file);
test(runbg(cmd, 100000), "Calling runbg");
if (test(fexist(file), "Verifying %s does not yet exist", file))
return 1;
test(sleep(1), "Waiting for runbg");
if (test(!fexist(file), "Verifying %s has been created", file))
return 1;
return 0;
}