-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnonreg.cpp
More file actions
42 lines (35 loc) · 769 Bytes
/
Copy pathnonreg.cpp
File metadata and controls
42 lines (35 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <sstream>
#define DEBUG
#include "mbprt.h"
int main()
{
std::ifstream test_list;
shell("\\rm test_list;");
shell("ls tests/*.bin >> test_list");
test_list.open("test_list");
std::ofstream test_results;
test_results.open("test_results");
std::stringstream cmd;
int n = 0;
while (not test_list.eof())
{
gstring s;
test_list >> s;
if (not test_list.eof() )//and (n < 2))
{
gkprintf("#MTest % : %", n, s);
gkprintf(cmd, "./dut -ncycles 10000 -bin_file '%s' 2>&1 | grep FAILED 1> result", s);
shell(cmd);
std::ifstream result;
result.open("result");
std::string x;
result >> x;
if (x.size() > 10)
gkprintf(test_results, "% failed\n", s);
}
n++;
}
}