Commit Graph

162 Commits

Author SHA1 Message Date
AdamKorcz
9c801316ba Added fuzzer with build script and seed 2020-12-08 20:18:29 +00:00
Jan Niklas Hasse
ea9f736100 Add missing Apache license header, fix #1781 2020-05-25 10:58:34 +02:00
Michael Hirsch, Ph.D
e44fcbede9
test: skip non-Windows tests if on Windows 2020-04-27 11:39:48 -04:00
Jan Niklas Hasse
112217185e Add output test for 'no work to do.' 2020-04-24 12:58:20 +02:00
Mike Gilbert
b748d08561 Replace references to README with README.md
The README file was renamed to README.md in commit
a37da20ae7.
2020-03-20 19:38:26 -04:00
Jan Niklas Hasse
791c887e22 Ignore nonexistent .ninja_log/.ninja_deps for restat and recompact 2019-12-23 14:11:09 +01:00
Jan Niklas Hasse
a67718de4e Run output test in temporary directory 2019-12-23 14:08:59 +01:00
Bernhard M. Wiedemann
07b1cf264a
Fix test_issue_1418 to pass on 1-core VM
the previous assert would fail because on a 1-core VM, the 3 outputs
were produced sequentially from top to bottom
2019-09-20 15:48:36 +02:00
Jan Niklas Hasse
71b9648932 Remove trailing whitespace from all files 2019-04-17 18:04:54 +02:00
Alex Vallee
c6b67ac402
ninja_syntax.py: remove unused has_path argument
The usage of the parameter was removed a long time ago and was never cleaned up. The argument is not provided in the test.
2019-01-30 22:12:52 +08:00
Takuto Ikuta
5a78423193 Add OSX build on travis (#1502)
Also make test script works for OSX script command.
2018-11-17 18:23:28 +01:00
Jan Niklas Hasse
bf7107bb86 Allow disabling of escape code stripping, fix #1475
Don't strip colors when CLICOLOR_FORCE is set to a non-zero value. This
environment variable is also used by CMake's Make back-end.
2018-11-13 15:15:43 +01:00
Jan Niklas Hasse
44ed3743af Make output_test.py independent of the environment 2018-11-07 18:20:07 +01:00
Jan Niklas Hasse
3841023a44 Add test for #1418 (edge output should match status) 2018-11-05 18:52:51 +01:00
Jan Niklas Hasse
775c8e89ef Add script to test Ninja's output
First test checks for #1214.
2018-11-05 18:42:31 +01:00
Jan Niklas Hasse
f6971c9139
Merge pull request #1472 from Hi-Angel/master
Fix wrong description of script installation
2018-11-02 09:20:28 +01:00
Konstantin Kharlamov
957d1990b6
Fix wrong description of script installation
The described way of installation makes zsh fail with `_arguments:comparguments:325: can only be called from completion function`. Per [zsh documentation](https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org#telling-zsh-which-function-to-use-for-completing-a-command) the correct way is to use `$fpath`.
2018-09-28 15:22:46 +03:00
Mo Zhou
33448c830b Misc typo fixes by https://github.com/codespell-project/codespell/ 2018-09-06 04:09:48 +00:00
Nico Weber
78759d0977 update ninja.vim version after bff884d55 2018-04-05 15:23:56 -04:00
Nico Weber
4fd758a81b
Merge pull request #1356 from RedBeard0531/vim_syntax
Improve vim syntax definition
2018-04-04 21:12:34 -04:00
Kareem Khazem
85fab32362
Support pool for Writer.build() in ninja_syntax.py
ninja_syntax.py now supports a pool being specified for individual
builds, as well as rules.
2018-02-20 18:51:01 +00:00
Mathias Stearn
bff884d550 Improve vim syntax definition
Only highlights comments where the ninja lexer would treat them as such.
Also correctly scopes the rule- and pool-specific variables highlighting.
2017-11-09 12:00:04 -05:00
Mathias Stearn
ad545320a7 Make zsh completion use explicitly specified ninja files 2017-05-18 09:51:31 -04:00
James Robinson
61c6884335 Fix syntax error in misc/write_fake_manifests.py
This is used by manifest_parser_perftest
2016-10-24 17:12:05 -07:00
Frank Benkstein
1992ab65ad enhance write_fake_manifest.py
Add an option to write_fake_manifest.py to generate sources expected by the
manifest.  Also slightly adapt command lines to the called commands.  Together
these changes mean that generated manifest can actually be executed
successfully on Linux and OSX.  Also add command line options to to change the
number of targets being generated and the seed for the random number generator.

Example usage:

  # create build directory in fake/build, sources in fake/src
  $ python misc/write_fake_manifest.py -s ../src fake/build
  # execute build in fake/build
  $ ninja -C fake/build
2016-06-23 12:23:23 +02:00
KiYugadgeter
28cedf1695 Make misc/measure.py compatible with python3 2016-05-04 11:38:31 +09:00
Nicolas Despres
d3c7da5893 Add support for implicit outputs in ninja_syntax.py. 2016-02-06 09:37:51 +01:00
Nicolas Despres
48e647781d Teach zsh to complete intermediary targets.
Bash completion script uses "-t targets all" to list the target which
is faster than "-t targets" and reports intermediary targets
(see the manual entry for the 'targets' tool).

See commit fc135c45.
2015-12-24 16:53:05 +01:00
Evan Martin
2eb1cc9329 Merge pull request #1042 from avallee/master
Fix wrapping file paths in Writer.comment
2015-12-06 11:17:55 -08:00
Alex Vallée
97e96284a3 Disable long word wrapping entirely in comments.
As pointed out by nico, we should unconditionally disable breaking of
long words in comments. It is unlikely long words that are in comments
should be split (like pathnames).
2015-11-27 16:09:34 -05:00
Nico Weber
207ff58e44 Merge pull request #1047 from pykello/master
Speed-up bash target auto-complete.
2015-11-11 21:46:33 -08:00
Nico Weber
dda86b7540 Merge pull request #1046 from zed0/master
Speed up zsh target completion
2015-11-11 21:46:19 -08:00
Alex Vallee
8c18cf97ff Fix indent in pull request #1042. 2015-11-11 22:48:39 -05:00
Nico Weber
5e076f0593 Update link to point to ninja-build.org 2015-11-11 13:27:16 -08:00
Nico Weber
c2307f9277 Make links point to org page 2015-11-11 11:53:15 -08:00
Hadi Moshayedi
fc135c456d Speed-up bash target auto-complete.
These speed-ups include:

* Let compgen do the command substitution. Similar to
  https://lists.gnu.org/archive/html/bug-bash/2012-03/msg00115.html
* Use "cut" instead of "awk" for separating fields.
2015-10-31 06:13:33 -04:00
Ben Falconer
530d2b1666 Speed up zsh target completion 2015-10-30 14:43:32 +00:00
Alex Vallée
8f658d6329 Fix wrapping file paths in Writer.comment
Long file names, especially with hyphens will get incorrectly wrapped by
the comment method. Pass has_path=True to prevent this type of wrapping.

This is mainly so that longer path names can show up in comments on
their on line without breaking them up.
2015-10-23 16:36:28 -04:00
Nico Weber
5560e2e26b Add notes on using afl-fuzz to HACKING. 2015-03-19 10:41:28 -07:00
Fraser Cormack
d130968ecd zsh-completion: remove use of 'head' with negative offset
Some systems - like OSX - don't come with a version of head that
supports a negative value for the -n flag. Such systems get a message
such as this when tab-completing ninja's -d flag:

    ninja -dhead: illegal line count -- -1

Using sed instead should be more universally supported.
2014-12-20 00:12:52 +00:00
Fanael Linithien
f5f4b3ba7c Remove unneeded save-excursion.
syntax-propertize-function is allowed to move the point and mark.
2014-11-24 19:09:33 +01:00
Fanael Linithien
40a76d8cd5 Use lexical-binding.
There's no reason not to use lexical-binding when supporting only
Emacs 24+. Its semantics are just that much saner.
2014-11-23 22:29:49 +01:00
Fanael Linithien
f15faca3c3 Add a Emacs 24 requirement.
Only Emacs >= 24 has prog-mode.
2014-11-23 22:26:54 +01:00
Fanael Linithien
11377a46d1 Correctly recognize a comment if the previous line is a comment ending in $. 2014-11-23 22:25:27 +01:00
Fanael Linithien
73f934e886 Avoid putting properties past the end of the buffer. 2014-11-23 22:25:27 +01:00
Fanael Linithien
14d161080c Don't use dotted list syntax unless necessary. 2014-11-23 22:25:27 +01:00
Fanael Linithien
310532c0b0 Remove unnecessary regexp group. 2014-11-23 22:25:27 +01:00
Fanael Linithien
931db561cf Correctly recognize comments. 2014-11-23 22:25:27 +01:00
Fanael Linithien
327c094596 Set up a proper syntax table for ninja-mode.
Since quotes are not meant to be treated as string delimiters,
the syntax table is the place to tell Emacs so.

This also means syntactic fontification can be reenabled and the
font-lock keyword entry for comments removed.
2014-11-23 22:25:27 +01:00
Fanael Linithien
c600a82589 Set comment-start buffer-locally, not globally. 2014-11-23 22:23:35 +01:00