Mads Kiilerich
43db2a4aa5
merge: change priority / ordering of merge actions
...
The ordering of actions matters. Normal file system semantics is that files
have to be removed before a directory with the same name can be created.
Before the first ordering key was to have 'r' and 'f' actions come first,
secondary key was the filename.
Because of future refactorings we want to consistently have all action types
(with a sensible priority) as separate first keys. Grouped by action type, we
sort by filename.
Not processing in strict filename order could give worse performance,
especially on spinning disks. That is however primarily an issue in the cases
where "all" actions are of the same kind and will be grouped together anyway.
2014-05-02 01:09:14 +02:00
Pierre-Yves David
b262d9a640
run-tests: fix --interactive option
...
``TTest._testpath`` never existed. This must be the remain of some contributors
side refactoring.
2014-05-17 00:47:42 -07:00
Pierre-Yves David
d2c3815194
run-test: fix AttributeError in the --interactive prompt
...
One must choose between ``"y yes".split()`` and ``('y', 'yes')``. I choose the
later.
The feature still crash when you answer "yes" to use it. But at least, the
prompt itself works.
2014-05-17 00:38:48 -07:00
Pierre-Yves David
8b89a74c6f
run-test: restore the -i prompt by write .err before checking if it exists
...
The `--interactive` flag workis by overwriting the original test file by its
`.err` version. So we need to write it before calling `self.fail`. Otherwise the
`.err` file does not exists and `--interactive` is ignored.
We can move that block code around because it is dedicated to write changed
output and we moves it in the try-except dedicated to handling changed output.
Note that the flog is still badly broken after this change. But at least it crash
instead of being ignored.
2014-05-17 00:37:06 -07:00
Gregory Szorc
1a9a4f69c5
run-tests: move _gethgpath() into TestRunner
2014-04-20 11:04:25 -07:00
Gregory Szorc
5d72ba5d0e
run-tests: move string escaping to TTest
...
With this patch, TTest is almost fully self-contained and extractable.
Only logging functions remain outside of its class.
2014-04-20 10:34:52 -07:00
Gregory Szorc
29c42e357d
run-tests: add some docstrings
2014-04-20 10:28:35 -07:00
Gregory Szorc
5be656d402
run-tests: move createhgrc into Test
2014-04-20 10:24:00 -07:00
Gregory Szorc
f91c5a5105
run-tests: move SKIPPED_PREFIX and FAILED_PREFIX into TTest
2014-04-20 10:19:58 -07:00
Gregory Szorc
a67c76a563
run-tests: move SKIPPED_STATUS into Test class
2014-04-20 10:16:36 -07:00
Gregory Szorc
3cae671831
run-tests: move parsehghaveoutput() into TTest
...
This patch starts a sequence of patches that will try to isolate
everything related to t tests into the TTest class.
2014-04-20 10:14:25 -07:00
Gregory Szorc
8d7902d08f
run-tests: make some methods of TestRunner internal
2014-04-20 10:11:46 -07:00
Gregory Szorc
77377eb9f9
run-tests: eliminate main()
2014-04-20 10:09:23 -07:00
Gregory Szorc
f77a2632fd
run-tests: move option parser logic to TestRunner.run()
2014-04-20 10:08:33 -07:00
Gregory Szorc
e8679e7082
run-tests: move umask into TestRunner.run()
...
We now properly restore the umask as well, since run() tries to clean up
after itself.
2014-04-20 10:06:19 -07:00
Gregory Szorc
1a7b678d41
run-tests: move checktools into TestRunner.run()
2014-04-20 10:05:00 -07:00
Gregory Szorc
9b509906ec
run-tests: move test discovery into TestRunner.run()
2014-04-20 10:04:15 -07:00
Gregory Szorc
015f85c261
run-tests: move test shuffling and sorting into TestRunner
2014-04-20 10:03:08 -07:00
Gregory Szorc
6b2b768e30
run-tests: assign testdir in TestRunner
2014-04-20 10:00:59 -07:00
Gregory Szorc
f10ceaaa22
run-tests: move hash seed logic to TestRunner
2014-04-20 09:59:01 -07:00
Gregory Szorc
c5b81eb209
run-tests: move tmpdir calculations into TestRunner
2014-04-20 09:58:26 -07:00
Gregory Szorc
3a9dcd2480
run-tests: move more path calculations into TestRunner
2014-04-20 09:57:02 -07:00
Gregory Szorc
c63c3fe0f7
run-tests: move pypath manipulation into TestRunner
2014-04-20 09:54:28 -07:00
Gregory Szorc
d8efe9acf0
run-tests: establish TestRunner.run()
...
(amended by mpm to remove environ cleanup - unrelated change that
breaks on Solaris)
2014-04-20 09:49:33 -07:00
Gregory Szorc
e9f87a494b
run-tests: move program searching into TestRunner
2014-04-20 09:44:39 -07:00
Gregory Szorc
85852466ca
run-tests: allow TestRunner to be passed into main()
...
This allows 3rd parties to specify a custom TestRunner. This is useful
for providing your own test discovery mechanism, for example.
2014-04-20 09:40:27 -07:00
Gregory Szorc
8b959d83f2
run-tests: move test discovery logic into a function
...
The new function is easily monkeypatchable. This facilitates more
advanced test discovery by 3rd parties such as extensions.
2014-04-20 00:23:06 -07:00
Gregory Szorc
27d037f441
run-tests: move scheduletests() into TestRunner
2014-04-20 00:12:26 -07:00
Gregory Szorc
eec6cde13e
run-tests: move abort global to TestRunner
2014-04-20 00:10:06 -07:00
Gregory Szorc
25b7330a18
run-tests: move runtests() into TestRunner
2014-04-20 00:06:30 -07:00
Gregory Szorc
e57adc8c20
run-tests: move results global into TestRunner
2014-04-20 00:03:32 -07:00
Gregory Szorc
ff5048b39c
run-tests: move times global into TestRunner
2014-04-19 23:59:06 -07:00
Gregory Szorc
1b4a48f3dc
run-tests: move gettest() into TestRunner
2014-04-19 23:53:23 -07:00
Gregory Szorc
2703caf446
run-tests: move outputcoverage() into TestRunner
2014-04-19 23:49:23 -07:00
Gregory Szorc
49cdc11656
run-tests: move outputtimes() into TestRunner
2014-04-19 23:47:59 -07:00
Gregory Szorc
f60ca60f88
run-tests: move checkhglib into TestRunner
2014-04-19 23:44:56 -07:00
Gregory Szorc
105c9c2fc1
run-tests: move installhg() into TestRunner
2014-04-19 23:43:00 -07:00
Gregory Szorc
023fa479ff
run-tests: move createdfiles out of a global and into TestRunner
2014-04-19 23:39:38 -07:00
Gregory Szorc
a24163eef4
run-tests: move usecorrectpython() into TestRunner
2014-04-19 23:38:10 -07:00
Gregory Szorc
88e6be733b
run-tests: move cleanup() into TestRunner
2014-04-19 23:35:27 -07:00
Gregory Szorc
e74d6a9170
run-tests: add options to runner
2014-04-19 23:33:44 -07:00
Gregory Szorc
691c3d4a63
run-tests: add options to runner
2014-04-19 23:28:59 -07:00
Gregory Szorc
fbb4e07860
run-tests: move COVERAGE_FILE out of a global
2014-04-19 23:27:11 -07:00
Gregory Szorc
cb55575cbf
run-tests: move PYTHONDIR out of a global
2014-04-19 23:26:15 -07:00
Gregory Szorc
cd540cf8ab
run-tests: move TMPBINDIR out of a global
2014-04-19 23:24:39 -07:00
Gregory Szorc
0b30c04fca
run-tests: move BINDIR out of a global
2014-04-19 23:22:47 -07:00
Gregory Szorc
e4684a44f0
run-tests: move INST out of a global
2014-04-19 23:20:42 -07:00
Gregory Szorc
985af7905a
run-tests: move HGTMP out of a global
2014-04-19 23:19:23 -07:00
Gregory Szorc
43a68f701f
run-tests: move TESTDIR out of a global
...
This patch starts the process of removing global variables from
run-tests.py. The goal of this is to make it easier to run tests
differently without having to concern yourself with global state.
2014-04-19 23:15:24 -07:00
Gregory Szorc
6ac2fa2ac5
run-tests: establish a class to hold testing state
2014-04-19 23:07:17 -07:00