sapling/tests
Jun Wu bcd74ba1c5 rage: silence exceptions when reading details
Summary:
rage is a basic tool to collect diagnostic information that should not break.
To ensure it works all the time, this patch:

  - unbreaks hg rage from upstream change dad6404ccd
  - wraps every non-trivial functions with `try`, `catch`
  - adds a naive test about `hg rage --preview`

Test Plan:
Run `test-rage.t`. Comment out `import blackbox` and check:

```
hg blackbox -l20:
---------------------------
(Failed. See footnote [1])

[1]: global name 'blackbox' is not defined
Traceback (most recent call last):
  File "/home/quark/fb-hgext/rage.py", line 22, in _failsafe
    return func()
  File "/home/quark/fb-hgext/rage.py", line 97, in <lambda>
    _failsafe(lambda: hgcmd(blackbox.blackbox, limit=20))),
NameError: global name 'blackbox' is not defined
```

Reviewers: #sourcecontrol, wez, ttung, durham

Reviewed By: durham

Subscribers: durham, wez, mjpieters

Differential Revision: https://phabricator.fb.com/D2928778

Tasks: 10028490

Signature: t1:2928778:1455240651:d39ceed5d045e279160690e0a93a4e326d307db3
2016-02-11 21:00:33 +00:00
..
conduithttp.py fix breakages due to fbconduit api changes regarding missing revs 2015-08-10 21:22:21 -07:00
copytrace.sh copytrace: skip tests if getdb.sh is not present 2016-02-05 03:23:19 -08:00
dummyext1.py cleanup: make all the code compliant with the i18n rules for ui strings 2016-01-11 10:19:22 -08:00
dummyext2.py cleanup: make all the code compliant with the i18n rules for ui strings 2016-01-11 10:19:22 -08:00
histedit-helpers.sh fb-histedit: Add a histedit extension that adds stop 2014-10-09 10:54:43 -07:00
killdaemons.py Add missing killdaemons 2015-11-09 12:21:39 -08:00
README test: backout e221a52 (remove run-tests.py once again) 2015-12-16 16:42:17 +00:00
test-automv.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-backup.t backups: show warning message for createmarkers even when evolve is not enabled 2016-01-11 07:41:42 -08:00
test-catnotate.t catnotate: add whole extension 2015-10-16 02:45:27 -07:00
test-check-code-hg.t cleanup: add test-check-code-hg.t 2016-01-11 10:19:22 -08:00
test-commitextras.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-copytrace-bundle2.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-copytrace.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-dirsync.t cleanup: make test-dirsync.t pass check code 2016-01-11 10:19:22 -08:00
test-errorredirect.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-extorder.t extorder: Fix test 2015-12-15 09:23:53 -08:00
test-fbamend.t [fbamend] back out D2804307 2016-02-08 10:54:41 -08:00
test-fbconduit.t cleanup: fix quoting patterns in tests 2016-01-07 18:30:24 -08:00
test-fbhistedit-exec-obsolete.t adjust tests for "hg update" output change 2016-02-08 14:46:24 -08:00
test-fbhistedit-exec.t adjust tests for "hg update" output change 2016-02-08 14:46:24 -08:00
test-fbhistedit-rebase-interactive.t fbhistedit: update to work with upstream histedit 2016-01-20 13:40:15 -08:00
test-fbhistedit-stop-obsolete.t adjust tests for "hg update" output change 2016-02-08 14:46:24 -08:00
test-fbhistedit-stop.t adjust tests for "hg update" output change 2016-02-08 14:46:24 -08:00
test-filldb.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-git-getmeta.t Dropped local run-tests in favour of using mercurial's own test runner 2015-10-01 13:03:03 -07:00
test-githelp.t show: Learn to do hg show REV FILES 2016-02-12 03:07:11 -08:00
test-inhibitwarn.t cleanup: fix whitespaces in expression and trailing whitespaces 2016-01-07 18:30:24 -08:00
test-manifestdiskcache.t fix some check-code violations 2016-02-04 16:24:31 -08:00
test-mergedriver.t mergedriver: make it clear that artifacts must be regenerated 2016-02-10 00:18:51 -08:00
test-morestatus.t morestatus: update test to reflect upstream change 2016-01-20 13:40:15 -08:00
test-perftweaks.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-phabdiff.t phabdiff: improve the {tasks} template 2015-12-16 15:53:53 -08:00
test-pull-createmarkers.t [pull-createmarkers] fix test to match output 2016-02-08 15:56:50 -08:00
test-pushrebase-protection.t [pushrebase] fix bug introduced in D2903928 2016-02-08 14:29:40 -08:00
test-pushrebase-remotenames.t [pushrebase] change the pushrebase tests to use the PYTHONPATH setup 2016-02-04 22:47:14 -08:00
test-pushrebase.t [pushrebase] change the pushrebase tests to use the PYTHONPATH setup 2016-02-04 22:47:14 -08:00
test-pushvars-remotenames.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-pushvars.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-rage.t rage: silence exceptions when reading details 2016-02-11 21:00:33 +00:00
test-reflog-remotenames.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-reflog.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-reset-remotenames.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-reset.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-show.t show: Learn to do hg show REV FILES 2016-02-12 03:07:11 -08:00
test-simplecache.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-smartlog-remotenames.t smartlog: warn user when there is no master commit locally 2016-02-02 11:15:28 -08:00
test-smartlog.t make smartlog not crash when having two histories in the repo 2016-02-11 17:31:42 -08:00
test-sparse-clone.t [sparse] fix check-code errors in sparse 2016-02-08 14:27:09 -08:00
test-sparse-extensions.t cleanup: fix quoting patterns in tests 2016-01-07 18:30:24 -08:00
test-sparse-merges.t sparse: fix temporary includes that are not in working copy 2015-05-19 10:18:50 -07:00
test-sparse-profiles.t sparse: update test output with simple change 2016-01-20 13:40:15 -08:00
test-sparse.t sparse: make debugrebuilddirstate --minimal sparse aware 2015-12-07 16:57:17 -08:00
test-tweakdefaults-histgrep.t histgrep: add a config option to allow histgrepping on the whole repo 2016-02-11 03:39:59 -08:00
test-tweakdefaults-ordering.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-tweakdefaults-remotenames.t cleanup: use backtick instead of parent to capture output of shell cmd 2016-01-07 18:30:24 -08:00
test-tweakdefaults.t tweakdefaults: support pull --rebase -d <dest> without remotenames 2016-02-05 10:02:41 -08:00

How to run Facebook experimental extensions tests
=================================================

Running the tests
-----------------

To run the tests, `cd` into this directory (./tests/) and run the `run-tests.py`
script from the core Mercurial repository (tests directory too).

For example if you have a 'hg-crew' repository checked out next to this one,
use:

  ../../hg-crew/tests/run-tests.py

Obtaining the test runners
--------------------------

If you do not already have a copy of the Mercurial repository, you can obtains
one with:

  $ hg clone http://selenic.com/hg/

Running against various Mercurial versions
------------------------------------------

By default, the test runners will run against the version of Mercurial in the
repository it lives in. you can run againts other version of Mercurial using
the --with-hg=PATH flag. For example to run against the installed version of
Mercurial you can use --with-hg=`which hg`