Example #1
0
void port_checker::print_skipped() const
{
    std::cout << "# Skipped ports" << std::endl << std::endl;
    std::cout << "The following ports have been skipped" << std::endl;
    std::cout << "This usually means they have been disabled" << std::endl;
    for(const std::string& s : skipped())
        std::cout << "* " << s << std::endl;
    std::cout << std::endl;
}
Example #2
0
void run(int i, char *f) {
	pid = fork();
	if (pid < 0) {
		perror("Fork failed.");
		exit(201);
	} else if (pid == 0) {
		close(0);
		dup2(fds[0], 1);
		dup2(fds[0], 2);
		execlp("bash", "bash", f, NULL);
		perror("execlp");
		fflush(stderr);
		_exit(202);
	} else {
		char buf[128];
		snprintf(buf, 128, "%s ...", f);
		buf[127] = 0;
		printf("Running %-40s ", buf);
		fflush(stdout);
		int st, w;
		while ((w = waitpid(pid, &st, WNOHANG)) == 0) {
			drain();
			usleep(20000);
		}
		if (w != pid) {
			perror("waitpid");
			exit(206);
		}
		drain();
		if (WIFEXITED(st)) {
			if (WEXITSTATUS(st) == 0) {
				passed(i, f);
			} else if (WEXITSTATUS(st) == 200) {
				skipped(i, f);
			} else {
				failed(i, f, st);
			}
		} else {
			failed(i, f, st);
		}
		clear();
	}
}
Example #3
0
void batchWindow::skip()
{
	emit skipped();
}
Example #4
0
int
main()
{
    skipped();
    return boost::report_errors();
}