summaryrefslogtreecommitdiffstats
path: root/reader/runtests.py
diff options
context:
space:
mode:
authorMac Mollison <mollison@cs.unc.edu>2010-03-13 12:09:00 -0500
committerMac Mollison <mollison@cs.unc.edu>2010-03-13 12:09:00 -0500
commit14a40b99735f09f6e70b8e897acbb622f9115ca3 (patch)
treee8420397374fd31aa36a66d0dc75872142d339e6 /reader/runtests.py
parenta643f0465d608552433ba326847eec5d0bef3108 (diff)
Directory restructuring
Reworked directory (and modified some code a bit) to match intended architecture.
Diffstat (limited to 'reader/runtests.py')
-rwxr-xr-xreader/runtests.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/reader/runtests.py b/reader/runtests.py
deleted file mode 100755
index 88dddf4..0000000
--- a/reader/runtests.py
+++ /dev/null
@@ -1,47 +0,0 @@
1#!/usr/bin/python
2
3###############################################################################
4# Description
5###############################################################################
6
7# Unit Tests
8
9
10###############################################################################
11# Imports
12###############################################################################
13
14import trace_reader
15import naive_trace_reader
16import os
17
18###############################################################################
19# Trace files
20###############################################################################
21
22files = [
23'./sample_traces/st-g6-0.bin',
24'./sample_traces/st-g6-1.bin',
25'./sample_traces/st-g6-2.bin',
26'./sample_traces/st-g6-3.bin',
27]
28
29###############################################################################
30# Tests
31###############################################################################
32
33# Does our fancy trace reader get the same number of files as our naive one?
34# (See naive_trace_reader.py for further explanation)
35def test1():
36 stream = trace_reader.trace_reader(files)
37 num_records = len(list(stream))
38 stream = naive_trace_reader.trace_reader(files)
39 naive_num_records = len(list(stream))
40
41 # We need a +1 here because the fancy reader produces a 'meta' record
42 # indicating the number of CPUs
43 if num_records != naive_num_records + 1:
44 return "[FAIL]"
45 return "[SUCCESS]"
46
47print "Test 1: %s" % (test1())