From fc74af6772ed9dd2433c291489b73e62c6ea97b8 Mon Sep 17 00:00:00 2001 From: Ben Patterson Date: Thu, 15 Jan 2015 13:15:18 -0500 Subject: [PATCH] Remove tddium-only scripts. --- scripts/post_quality_build.sh | 15 ----------- scripts/post_worker.py | 47 ----------------------------------- 2 files changed, 62 deletions(-) delete mode 100755 scripts/post_quality_build.sh delete mode 100644 scripts/post_worker.py diff --git a/scripts/post_quality_build.sh b/scripts/post_quality_build.sh deleted file mode 100755 index 0492ef48d6..0000000000 --- a/scripts/post_quality_build.sh +++ /dev/null @@ -1,15 +0,0 @@ -current_path=`pwd` - -reports_path=$current_path/reports - -dest_path=$HOME/results/$TDDIUM_SESSION_ID/session/ - -echo "Getting Quality Reports... " - -pep8_rpt=$reports_path/diff_quality/diff_quality_pep8.html -pylint_rpt=$reports_path/diff_quality/diff_quality_pylint.html - -cp -f $pep8_rpt $dest_path -cp -f $pylint_rpt $dest_path - -echo "Reports can be found in "$dest_path diff --git a/scripts/post_worker.py b/scripts/post_worker.py deleted file mode 100644 index 7ffc7e0f24..0000000000 --- a/scripts/post_worker.py +++ /dev/null @@ -1,47 +0,0 @@ -import tarfile -import os -import shutil - -full_path = os.path.realpath(__file__) -source_dir = full_path.replace("scripts/post_worker.py", "reports/") -output_filename = full_path.replace("post_worker.py", "reports.tar.gz") - -print "source dir:", source_dir - -count = 0 - -# walk through every subdirectory & add the folder if it is not empty -with tarfile.open(output_filename, "w:gz") as tar: - for (path, dirs, files) in os.walk(source_dir): - if len(files) > 0: - print "tarring:", path - tar.add(path, arcname=os.path.basename(path)) - count += 1 - -tar.close() - -session_path = os.path.join( - os.environ['HOME'], - 'results', - os.environ['TDDIUM_SESSION_ID'], - 'session') - -file_dest = os.path.join(session_path, 'reports.tar.gz') - -# if the tar file is not empty, copy it to the proper place -if count > 0: - print 'copying tar file to:', file_dest - shutil.copyfile(output_filename, file_dest) - -# finding if there is any screenshot or log file -print 'attaching failed screenshots and logs (if any)' -for (path, dirs, files) in os.walk('test_root/log'): - for filename in files: - if filename.find('png') != -1 or filename.find('log') != -1: - filepath = os.path.join(path, filename) - print 'copying file:', filepath - destpath = os.path.join(session_path, filename) - print 'destination:', destpath - shutil.copyfile(filepath, destpath) - -print 'TDDIUM_SESSION_ID:', os.environ['TDDIUM_SESSION_ID']