Commit a70c5c1f authored by Markus Kauppila's avatar Markus Kauppila

Runner is automatically installed to .

parent 2f3c2a94
......@@ -9,8 +9,10 @@ SUBDIRS = src/libtest src/runner \
tests/testrwops \
tests/testrender
all-local: install-tests
install: install-tests
all-local: install
install: install-runner install-tests
install-runner:
$(SHELL) build-scripts/install-runner.sh
install-tests:
$(SHELL) build-scripts/install-tests.sh
......
#! /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)) {
// 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 = ".";
char *name = strtok(entry->d_name, delimiters);
char *ext = strtok(NULL, delimiters);
......@@ -360,8 +360,13 @@ UnloadTestSuites(TestSuiteReference *suites)
{
TestSuiteReference *ref = suites;
while(ref) {
if(ref->name)
SDL_free(ref->name);
if(ref->directoryPath)
SDL_free(ref->directoryPath);
if(ref->library)
SDL_UnloadObject(ref->library);
TestSuiteReference *temp = ref->next;
......@@ -480,8 +485,13 @@ UnloadTestCases(TestCase *testCases)
{
TestCase *ref = testCases;
while(ref) {
if(ref->testName)
SDL_free(ref->testName);
if(ref->suiteName)
SDL_free(ref->suiteName);
if(ref->description)
SDL_free(ref->description);
TestCase *temp = ref->next;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment