Bug 1411462 - Add test for `configure --help`; r=glandium
authorGregory Szorc <gps@mozilla.com>
Tue, 24 Oct 2017 17:10:55 -0700
changeset 391168 6fff2c7ad3fc36bbbced77302f671ac6ddfe97b5
parent 391167 5e6769924323b3c375ca2ee45b7315e8dbaa6122
child 391169 a4f05c8137abb4788c13e8aadd855135fe18579b
push id32866
push userryanvm@gmail.com
push dateFri, 10 Nov 2017 21:06:07 +0000
treeherdermozilla-central@9da355ba1fe3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1411462
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1411462 - Add test for `configure --help`; r=glandium We add a simple cram test that `configure --help` works. I added the test to build/tests because I'm not sure where else it should go. This test uncovers a few interesting things: 1) piping `./configure --help` to `head` directly causes a Python traceback (presumably due to the pipe disappearing once N lines have been read) 2) "checking for vcs source checkout" is printed for --help 3) It is printed twice (!!) These will be addressed later. Establishing test coverage is more important. MozReview-Commit-ID: 9zQ5X8ulTkc
build/moz.build
build/tests/cram/cram.ini
build/tests/cram/test_configure_help.t
--- a/build/moz.build
+++ b/build/moz.build
@@ -10,16 +10,20 @@ with Files('**'):
 # This cannot be named "build" because of bug 922191.
 SPHINX_TREES['buildsystem'] = 'docs'
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     DIRS += ['win32']
 else:
     DIRS += ['unix']
 
+CRAMTEST_MANIFESTS += [
+    'tests/cram/cram.ini',
+]
+
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
     DIRS += ['annotationProcessors']
 
 DEFINES['ACCEPTED_MAR_CHANNEL_IDS'] = CONFIG['ACCEPTED_MAR_CHANNEL_IDS']
 
 if CONFIG['MOZ_BUILD_APP'] == 'browser':
     PYTHON_UNITTEST_MANIFESTS += [
         'compare-mozconfig/python.ini',
new file mode 100644
--- /dev/null
+++ b/build/tests/cram/cram.ini
@@ -0,0 +1,1 @@
+[test_configure_help.t]
new file mode 100644
--- /dev/null
+++ b/build/tests/cram/test_configure_help.t
@@ -0,0 +1,15 @@
+configure --help works
+
+  $ cd $TESTDIR/../../..
+
+  $ touch $TMP/mozconfig
+  $ export MOZCONFIG=$TMP/mozconfig
+  $ ./configure --help > out
+  $ head -n 7 out
+  Adding configure options from */tmp/mozconfig (glob)
+  checking for vcs source checkout... hg
+  checking for vcs source checkout... hg
+  Usage: configure.py [options]
+  
+  Options: [defaults in brackets after descriptions]
+    --help                    print this message