Runner is automatically installed to .
This commit is contained in:
parent
2f3c2a946c
commit
a70c5c1f3d
3 changed files with 29 additions and 9 deletions
|
@ -9,8 +9,10 @@ SUBDIRS = src/libtest src/runner \
|
||||||
tests/testrwops \
|
tests/testrwops \
|
||||||
tests/testrender
|
tests/testrender
|
||||||
|
|
||||||
all-local: install-tests
|
all-local: install
|
||||||
install: install-tests
|
install: install-runner install-tests
|
||||||
|
install-runner:
|
||||||
|
$(SHELL) build-scripts/install-runner.sh
|
||||||
install-tests:
|
install-tests:
|
||||||
$(SHELL) build-scripts/install-tests.sh
|
$(SHELL) build-scripts/install-tests.sh
|
||||||
|
|
||||||
|
|
8
test/test-automation/build-scripts/install-runner.sh
Executable file
8
test/test-automation/build-scripts/install-runner.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
#echo "Installing test suites to $DIRECTORY"
|
||||||
|
|
||||||
|
cp src/runner/.libs/runner .
|
||||||
|
chmod u+x runner
|
||||||
|
|
||||||
|
echo "Runner installed."
|
|
@ -234,7 +234,7 @@ ScanForTestSuites(char *directoryName, char *extension)
|
||||||
|
|
||||||
while(entry = readdir(directory)) {
|
while(entry = readdir(directory)) {
|
||||||
// discards . and .. and hidden files starting with .
|
// discards . and .. and hidden files starting with .
|
||||||
if(strlen(entry->d_name) > 2 && entry->d_name[0] != '.') {
|
if(strlen(entry->d_name) > 2 && entry->d_name[0] != '.' && entry->d_type == DT_REG) {
|
||||||
const char *delimiters = ".";
|
const char *delimiters = ".";
|
||||||
char *name = strtok(entry->d_name, delimiters);
|
char *name = strtok(entry->d_name, delimiters);
|
||||||
char *ext = strtok(NULL, delimiters);
|
char *ext = strtok(NULL, delimiters);
|
||||||
|
@ -360,9 +360,14 @@ UnloadTestSuites(TestSuiteReference *suites)
|
||||||
{
|
{
|
||||||
TestSuiteReference *ref = suites;
|
TestSuiteReference *ref = suites;
|
||||||
while(ref) {
|
while(ref) {
|
||||||
SDL_free(ref->name);
|
if(ref->name)
|
||||||
SDL_free(ref->directoryPath);
|
SDL_free(ref->name);
|
||||||
SDL_UnloadObject(ref->library);
|
|
||||||
|
if(ref->directoryPath)
|
||||||
|
SDL_free(ref->directoryPath);
|
||||||
|
|
||||||
|
if(ref->library)
|
||||||
|
SDL_UnloadObject(ref->library);
|
||||||
|
|
||||||
TestSuiteReference *temp = ref->next;
|
TestSuiteReference *temp = ref->next;
|
||||||
SDL_free(ref);
|
SDL_free(ref);
|
||||||
|
@ -480,9 +485,14 @@ UnloadTestCases(TestCase *testCases)
|
||||||
{
|
{
|
||||||
TestCase *ref = testCases;
|
TestCase *ref = testCases;
|
||||||
while(ref) {
|
while(ref) {
|
||||||
SDL_free(ref->testName);
|
if(ref->testName)
|
||||||
SDL_free(ref->suiteName);
|
SDL_free(ref->testName);
|
||||||
SDL_free(ref->description);
|
|
||||||
|
if(ref->suiteName)
|
||||||
|
SDL_free(ref->suiteName);
|
||||||
|
|
||||||
|
if(ref->description)
|
||||||
|
SDL_free(ref->description);
|
||||||
|
|
||||||
TestCase *temp = ref->next;
|
TestCase *temp = ref->next;
|
||||||
SDL_free(ref);
|
SDL_free(ref);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue