Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removing dropbox code from run_tests.py #210

Merged
merged 1 commit into from
Jan 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
help="create and show html result page")
parser.add_argument("-p", "--package", action="store_true",
help="package test results")
parser.add_argument("-D", "--dropbox", action="store_true",
help="upload packaged test results to dropbox (access token must be stored in the envirnoment variable DROPBOX_TOKEN)")

parser.add_argument(
"-c",
"--coverage",
Expand Down Expand Up @@ -202,7 +201,7 @@ def run_nose(test_name):
print("Failed tests:")
for f in failed:
print("\t", f)
if args.html or args.package or args.dropbox:
if args.html or args.package:
if not os.path.exists("tests_html"):
os.makedirs("tests_html")
os.chdir("tests_html")
Expand Down Expand Up @@ -274,7 +273,7 @@ def run_nose(test_name):
os.chdir(root)
shutil.rmtree(tmpdir)

if args.package or args.dropbox:
if args.package:
import tarfile
os.chdir(tmpdir)
tnm = "results_%s_%s_%s.tar.bz2" % (os.uname()[0],os.uname()[1],time.strftime("%Y-%m-%d_%H:%M"))
Expand All @@ -285,12 +284,6 @@ def run_nose(test_name):
t.close()
if args.verbosity > 0:
print("Packaged Result Info in:", tnm)
if args.dropbox:
import dropbox
dbx = dropbox.Dropbox(os.environ.get("DROPBOX_TOKEN",""))
f=open(tnm,"rb")
dbx.files_upload(f.read(),"/%s"%tnm)
f.close()

if args.subdir and len(failed)!=0:
print("Do not removing to clean temp directory: %s" % tmpdir)
Expand Down