fix Makefile

This commit is contained in:
hardtobelieve 2019-02-09 07:23:44 -08:00
parent 3124556c09
commit 0626c30797
3 changed files with 11 additions and 7 deletions

View File

@ -7,5 +7,7 @@ all:
rm -rf $(BUILD)
mkdir $(BUILD)
$(CC) -g $(SOURCE)/*.c -I$(INCLUDE) -o $(BUILD)/cstest $(LIBRARY)
cstest:
$(BUILD)/cstest -d ../MC
clean:
rm -rf $(BUILD)

View File

@ -10,11 +10,16 @@ make
## Usage
- Test for all closed issues
```
cd issues
cd suite/cstest
./build/cstest ./issues.cs
```
- Test for some input from LLVM
```
cd issues
cd suite/cstest
./build/cstest ../MC/AArch64/basic-a64-instructions.s.cs
```
- Test all
```
cd suite/cstest
make cstest
```

View File

@ -142,11 +142,6 @@ void test_file(const char *filename)
int issue_num;
printf("[+] TARGET: %s\n", filename);
if (strcmp("cs", get_filename_ext(filename))) {
printf("[-] Invalid file\n");
return;
}
content = readfile(filename);
counter = 0;
failed_setup = 0;
@ -195,6 +190,8 @@ void test_folder(const char *folder)
num_files = 0;
listdir(folder, &files, &num_files);
for (i=0; i<num_files; ++i) {
if (strcmp("cs", get_filename_ext(files[i])))
continue;
test_file(files[i]);
}
}