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

--HG--
extra : rebase_source : aaf660152cdfe37580f559976bca13ea9bf14c49
This commit is contained in:
Gregory Szorc 2017-10-24 17:10:55 -07:00
Родитель af0d5cdd38
Коммит 407d687142
3 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -15,6 +15,10 @@ if CONFIG['OS_ARCH'] == 'WINNT':
else:
DIRS += ['unix']
CRAMTEST_MANIFESTS += [
'tests/cram/cram.ini',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
DIRS += ['annotationProcessors']

Просмотреть файл

@ -0,0 +1 @@
[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