aboutsummaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-02-19 08:36:28 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-02-20 23:32:04 +0530
commit2a64a2d00c278b42b544f32e299547753ed22e36 (patch)
treea47da2357f6ec545d9f59ad80cda01e7a0f0b17d /run_tests.py
parent79fcd7054d1f25936c559618b6b4349f9d5f5219 (diff)
downloadmeson-2a64a2d00c278b42b544f32e299547753ed22e36.zip
meson-2a64a2d00c278b42b544f32e299547753ed22e36.tar.gz
meson-2a64a2d00c278b42b544f32e299547753ed22e36.tar.bz2
run_tests.py: Nice down when running on a dev machine
To avoid destroying productivity.
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/run_tests.py b/run_tests.py
index 005717e..b7ab7e9 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -14,12 +14,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import subprocess, sys, shutil
+import os
+import sys
+import shutil
+import subprocess
import platform
from mesonbuild import mesonlib
if __name__ == '__main__':
returncode = 0
+ # Running on a developer machine? Be nice!
+ if not mesonlib.is_windows() and 'TRAVIS' not in os.environ:
+ os.nice(20)
print('Running unittests.\n')
if mesonlib.is_linux():
returncode += subprocess.call([sys.executable, 'run_unittests.py', '-v'])