Skip to content
Snippets Groups Projects
Commit 271b23e9 authored by toole1's avatar toole1
Browse files

monad release

git-svn-id: https://subversion.cs.illinois.edu/svn/cs225@4593 6fbd10e7-183d-0410-a318-cb416676e4f2
parent 8c0d2dfc
No related branches found
No related tags found
No related merge requests found
monad identification file
This file is used for monad directory identification
Built by toole1 on linux4.ews.illinois.edu
Build Date: Wed Sep 21 17:20:29 CDT 2011
Build Date: Thu Sep 22 14:43:51 CDT 2011
CC = g++
CFLAGS = -Wall
CFLAGS = -Wall -Wshadow
EXENAME = monad
OBJS = $(EXENAME).o help.o util.o monad_shared.o
IDFILE = .monadid
......@@ -25,10 +25,15 @@ $(IDFILE): $(OBJS)
$(EXENAME): $(OBJS) $(IDFILE)
$(CC) $(CFLAGS) $(OBJS) -o $@
help.cpp: $(wildcard *.h) README.cg
help.cpp: $(wildcard *.h) README.cg LICENSE.cg
CONVERT_TXT_TO_CG=sed -e 's/"/\\"/g' -e 's/^/ << "/' -e 's/$$/" << endl/'
README.cg: README.txt
sed -e 's/"/\\"/g' -e 's/^/ << "/' -e 's/$$/" << endl/' README.txt > README.cg
$(CONVERT_TXT_TO_CG) README.txt > README.cg
LICENSE.cg: LICENSE.txt
$(CONVERT_TXT_TO_CG) LICENSE.txt > LICENSE.cg
.cpp.o: $(wildcard *.h)
$(CC) $(CFLAGS) -c $(@:.o=.cpp) -o $@
......
CC = g++
CFLAGS += -Wall
CFLAGS += -Wall -Wshadow
TESTEXE := proxy
# This order is necessary for security. Always include student code last!
TESTOBJS := $(TESTEXE).o util.o unit_tests.o monad_shared.o $(TESTOBJS)
......
......@@ -10,4 +10,11 @@ void printHelp()
;
}
void printLicense()
{
cout
#include "LICENSE.cg"
;
}
} // namespace monad
No preview for this file type
......@@ -23,6 +23,7 @@ namespace monad
{
void printHelp();
void printLicense();
}
......
......@@ -244,7 +244,7 @@ int32_t RunTests::run_single_test(unit_test & curr_test)
cout << "Running " << curr_test.name << " [worth "
<< curr_test.points << " points, output below]" << endl;
bool is_parent_process = execute_test(curr_test, environment, false);
bool is_parent_process = execute_test(curr_test, false);
if (!is_parent_process)
return environment.cleanup_globals();
......@@ -295,7 +295,7 @@ int RunTests::run_all_tests()
unit_test & curr_test = tests[test_i];
output::testname(curr_test, max_testname_len, max_points_len);
bool is_parent_process = execute_test(curr_test, environment, true);
bool is_parent_process = execute_test(curr_test, true);
// Check for the child process
// This is unfortunately necessary (instead of an exit) to clean up
// all the memory in use in main and the global space for valgrind
......@@ -460,7 +460,7 @@ void test_execution::after_failure(int8_t signal_number)
}
bool RunTests::execute_test(unit_test & test, RunTimeEnvironment & environment, bool enable_valgrind_call)
bool RunTests::execute_test(unit_test & test, bool enable_valgrind_call)
{
cout << std::flush;
test_execution executor(test, environment, enable_valgrind_call);
......
......@@ -111,7 +111,7 @@ namespace proxy
void output_detailed_info_if_any_failed(int32_t score);
void output_detailed_tests_info(int32_t score);
bool execute_test(unit_test & test, RunTimeEnvironment & environment, bool enable_valgrind_call);
bool execute_test(unit_test & test, bool enable_valgrind_call);
private:
RunTests(const RunTests & other);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment