Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
Set correct working directory in Fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
intsco committed May 2, 2016
1 parent 1b335d4 commit 0db1c07
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
A handy module for easy tests running
"""


import os
from fabric.api import local
from fabric.context_managers import lcd
import argparse


Expand All @@ -22,24 +23,25 @@

py_test_cmd = 'py.test -x -v '

# Engine unit tests
if args.unit or args.all:
local(py_test_cmd + 'sm/engine/tests')

# Regression tests
if args.regr or args.all:
local(py_test_cmd + 'tests/test_imzml_txt_converter_db.py')
local(py_test_cmd + 'tests/test_theor_peaks_gen_db.py')
local(py_test_cmd + 'tests/test_work_dir.py')
local(py_test_cmd + 'tests/test_dataset_db.py')
local(py_test_cmd + 'tests/test_search_results.py')
local(py_test_cmd + 'tests/test_search_job_imzml_example.py')

# Functional/scientific tests
if args.sci or args.all:
local('python tests/sci_test_search_job_spheroid_dataset.py --run')

if args.unit or args.all or args.regr or args.sci:
print 'ALL TESTS FINISHED SUCCESSFULLY'
else:
parser.print_help()
with lcd(os.path.dirname(__file__)):
# Engine unit tests
if args.unit or args.all:
local(py_test_cmd + 'sm/engine/tests')

# Regression tests
if args.regr or args.all:
local(py_test_cmd + 'tests/test_imzml_txt_converter_db.py')
local(py_test_cmd + 'tests/test_theor_peaks_gen_db.py')
local(py_test_cmd + 'tests/test_work_dir.py')
local(py_test_cmd + 'tests/test_dataset_db.py')
local(py_test_cmd + 'tests/test_search_results.py')
local(py_test_cmd + 'tests/test_search_job_imzml_example.py')

# Functional/scientific tests
if args.sci or args.all:
local('python tests/sci_test_search_job_spheroid_dataset.py --run')

if args.unit or args.all or args.regr or args.sci:
print 'ALL TESTS FINISHED SUCCESSFULLY'
else:
parser.print_help()

0 comments on commit 0db1c07

Please sign in to comment.