Use argparse instead of optparse in run_tests.

pull/39/merge
Jussi Pakkanen 10 years ago
parent 436a81f920
commit c3645e2b45
  1. 9
      run_tests.py

@ -18,7 +18,8 @@ from glob import glob
import os, subprocess, shutil, sys, platform, signal import os, subprocess, shutil, sys, platform, signal
import environment import environment
import mesonlib import mesonlib
from optparse import OptionParser import argparse
from meson import backendlist from meson import backendlist
passing_tests = 0 passing_tests = 0
@ -328,10 +329,10 @@ def generate_prebuilt_object():
return objectfile return objectfile
if __name__ == '__main__': if __name__ == '__main__':
parser = OptionParser() parser = argparse.ArgumentParser(description="Run the test suite of Meson.")
parser.add_option('--backend', default=None, dest='backend', parser.add_argument('--backend', default=None, dest='backend',
choices = backendlist) choices = backendlist)
(options, args) = parser.parse_args(sys.argv) options = parser.parse_args()
setup_commands(options.backend) setup_commands(options.backend)
script_dir = os.path.split(__file__)[0] script_dir = os.path.split(__file__)[0]

Loading…
Cancel
Save