-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workload parser that verifies the results and generates XML results
- Loading branch information
1 parent
04addfe
commit fe4d075
Showing
9 changed files
with
89 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env python3 | ||
import sys | ||
import logging | ||
import glob | ||
from os import path | ||
import os | ||
|
||
|
||
class Test_Workload_Results(): | ||
def test_bash_workload(self): | ||
bash_result_file = open("Examples/bash/OUTPUT", "r") | ||
bash_contents = bash_result_file.read() | ||
assert("readlink" in bash_contents) | ||
|
||
def test_curl_load(self): | ||
curl_result_file = open("Examples/curl/OUTPUT", "r") | ||
curl_contents = curl_result_file.read() | ||
assert("Hello World" in curl_contents) | ||
|
||
def test_python_workload(self): | ||
python_result_file = open("Examples/python/TEST_STDOUT", "r") | ||
python_contents = python_result_file.read() | ||
assert("Success 1/4" in python_contents) | ||
assert("Success 2/4" in python_contents) | ||
assert("Success 3/4" in python_contents) | ||
assert("Success 4/4" in python_contents) | ||
|
||
def test_lightppd_workload(self): | ||
for filename in glob.glob("Examples/lighttpd/result-*"): | ||
lightppd_result_file = open(filename,"r") | ||
lightppd_contents = lightppd_result_file.read() | ||
assert("0,0" in lightppd_contents) | ||
|
||
def test_nginx_workload(self): | ||
for filename in glob.glob("Examples/nginx/result-*"): | ||
nginx_result_file = open(filename,"r") | ||
nginx_contents = nginx_result_file.read() | ||
assert("0,0" in nginx_contents) | ||
|
||
def test_blender(self): | ||
blender_result_file = "Examples/blender/data/images/simple_scene.blend0001.png" | ||
assert(path.exists(blender_result_file)) | ||
|
||
def test_r_load(self): | ||
r_result_file = open("Examples/r/OUTPUT", "r") | ||
r_contents = r_result_file.read() | ||
assert("success" in r_contents) | ||
|
||
def test_redis(self): | ||
redis_result_file = open("Examples/redis/OUTPUT", "r") | ||
redis_contents = redis_result_file.read() | ||
assert(("PING_INLINE" in redis_contents) and ("MSET" in redis_contents)) | ||
|