Commit Graph

228 Commits

Author SHA1 Message Date
starkos
f466e4b7b2 Fix #1628 failing macOS os.findlib() test 2021-10-29 06:28:11 -04:00
Jarod42
29fa743f19 Improve rule support:
- move rule code from gmake2.lua to rule.lua
- Add UTs
- Fix enum case
- uniformise code for list.
- Add support of rules for Codelite.
2021-10-28 14:46:10 +02:00
Nicholaus Clark
076b9684af Renormalized line endings in the repository 2021-06-23 20:03:18 -04:00
Renaud Guillard
d9f15aec7c os.outputof: add a second argument to select which stream to output
local o, e = os.outputof(cmd, streams)

    Where streams could be one of
    - "output" Only return standard output stream content
    - "error" Only return standard error stream content
    - "both" (default) Return both streams content
2021-01-25 19:18:48 +01:00
starkos
0c792a0ff3 Disable network tests; add --test-all flag to enable
Hides the automated tests that require calls out to the network behind a new `--test-all` flag. Allows for faster TDD iterations for new development, and tests can now be run even when offline.
2020-10-07 09:31:15 -04:00
starkos
08a19770f8
Merge pull request #1484 from LORgames/ssurtees/symlink
Fixed issue with os.matchfiles and symlinks
2020-07-10 14:56:25 -04:00
Sam Surtees
ce186b1292 Fixed issue with os.matchfiles and symlinks 2020-07-11 02:02:42 +10:00
Sam Surtees
a56be783de Disable redirect test until HTTP endpoint is fixed 2020-07-11 00:03:12 +10:00
tempura-sukiyaki
40e3fbf5ea Change deferred join delimiter to non-printable character
This is a squashed and rebased version of #1384, authored by @tempura-sukiyaki. Changes the deferred join path delimiter to a non-printable character to avoid conflicts with the pipe symbol in paths.
2020-02-25 18:53:26 -05:00
Sam Surtees
9128498bf9 Fixed edge case in path.normalize 2020-02-02 16:30:44 +10:00
Jordi Vilalta Prat
75ceeb50c6 Fix the return values of os.rmdir() and os.remove() 2019-10-31 18:11:25 +01:00
Petr Kalandra
95fb306b2b New 'listWindowsRegistry' OS API method for enumerating content of single Windows registry subkey 2019-10-14 21:35:13 +02:00
Sam Surtees
1d24f9994b Fixed issue with detoken not handling deferred joins correctly 2019-02-14 23:14:34 +10:00
tdesveaux
a1d7e8657c Host path.normalize: Fix normalization for paths containing tokens 2018-11-04 18:01:29 +01:00
Thomas Desveaux
f68c386341 path.normalize: Fix when call with path surrounded with quotes 2018-10-11 14:21:42 +02:00
tdesveaux
439a1b373d Path normalize: Add test for server path (//) 2018-08-12 15:17:20 +02:00
Thomas Desveaux
051ed6a1ab Path normalize: Add test with trailing dot 2018-07-19 18:34:36 +02:00
Sebastian Kylander
b618a94d7c Add tests for server paths 2018-07-17 23:41:22 +02:00
Daniel Schmidt
30d22de0b6 Fix httpbin useragent response format. 2018-05-11 10:49:15 +02:00
Sam Surtees
138a443b3c Fixed issues with duplicate tests
- Test suite will now fail when test names are reused
- Fixed several unit tests that reused test names
2018-04-30 17:01:20 +02:00
Sam Surtees
eb71045c38 Fixed bug with alias tests that caused one to three extra tests to be run 2018-05-01 00:14:41 +10:00
thomas desveaux
15829d5967 Merge remote-tracking branch 'premake/master' into fix-mergeFilters 2018-04-12 23:34:25 +02:00
Sam Surtees
9039232548 Fixed a bug with normalizing paths that contain dot folders
- Added additional tests
2018-01-08 03:21:55 +10:00
Tom van Dijck
3f0aa55e8b sometimes due to ordering of test, we're in a rule scope, which makes settings some of the values into configsets illegal.
So we just force ourselves into a project scope.
2017-10-16 16:43:02 -07:00
R. Blaine Whittle
b88d4eff3e [core] path:join can now be deferred for those paths that execute lua
prior to this change, paths that begin with ${ } were sometimes assumed to
be either absolute or relative.  new functions have been added in order
to reduce the number of systems that can break.

new functions are

path:absolutetype -> similair to isabsolute but can return an unknown or maybe result
path:deferredjoin -> similair to path:join but creates a string for unknown absolute
	paths which we except to be generated at bake time
path:hasdeferredjoin -> predicate to determine if a path needs to be evaled for
    	a deferred join
path:resolvedeferredjoin -> resolves a deferredjoin path to an actual path
    	this is to be called after any %{} replacements occur.

right now all api path types use the deferredjoin code path and
detoken, solution:makerelative and project:makerelative have been updated
to use resolvedeferredjoin.

unit tests have been created to test the four new path functions.
added unit tests
2017-10-04 09:53:00 -07:00
Thomas Desveaux
49061141ef Fix context.mergeFilters 2017-09-06 14:44:42 +02:00
Tom van Dijck
b8df7985e8 Allow tokens to start with a ! to disable making paths relative. 2017-08-28 16:03:06 -07:00
Samuel Surtees
5a75b7e488 Merge pull request #872 from starkos/quiet-binmodule-test-output
Rework binmodule example to silence unit test console output
2017-08-11 12:48:34 +10:00
Jason Perkins
e2a49986ee Disable failing os.findheader() unit test on macOS 2017-08-10 14:55:16 -04:00
Jason Perkins
c3b0da7894 Rework binmodule example to silence unit test console output 2017-08-10 14:40:45 -04:00
Tom van Dijck
e0cbecd100 Remove "test.print" calls. 2017-08-07 09:26:07 -07:00
Tom van Dijck
74819eb945 Merge pull request #854 from Blizzard/high-warning
[core] Add High as a new warning level
2017-08-01 11:09:40 -07:00
Tom van Dijck
e430bdfef9 I've seen this test fail a few times in the past, but only on CI...
adding prints to see what we get, so we may find the issue in the future.
2017-08-01 10:09:32 -07:00
Tom van Dijck
36f835f313 Proof of concept for binary modules. 2017-07-04 19:19:23 -07:00
Tom van Dijck
3f2f40c5fa Move VStudio action into a module. 2017-06-19 13:12:05 -07:00
Tom van Dijck
7b9ff9f840 Update to Lua 5.3.4 2017-06-19 12:11:49 -07:00
Tom van Dijck
6841eb1752 [core] Allow filters to be written as:
```lua
filter {
    files  = { "**.c" },
    system = "windows"
}
```
2017-06-13 08:39:47 -07:00
Renaud Guillard
38bbf60993 test: disable os.findheader() on windows 2017-05-13 23:01:25 +02:00
Renaud Guillard
9eba1e7fb6 add os.findheader() 2017-05-06 00:00:51 +02:00
Tom van Dijck
f1d461f3a5 Add test for multiple tokens. 2017-05-02 09:09:38 -07:00
R. Blaine Whittle
bce3f2c4ed [core] new cmd path decorations with %[] syntax
this is for marking cmd options as paths relative to the
projects base dir. decorated paths can use tokens / macros
decorated paths are wrapped with "".  Final slashes are
honored. Slashes are platform specific.

Note that the working dir for custom cmd is undefined as
the current working dir will be different between xcode (wks.location)
and visual studio / make (prj.location.)  Changing the CWD isn't
a good default behavior (for reasons.)  This leads to prior
use of premake requiring alot of string concating / function calls
for path translations which make the cmd line difficult to read and maintain.
With path decorations, one can just make those relative paths with %[]
and everything should work.
2017-05-01 12:18:52 -07:00
Sam Surtees
b251234b27 Cleaned up inconsistencies in whitespace 2017-04-26 03:40:43 +10:00
Sam Surtees
fa3328440e Increased consistency of p. usage 2017-04-25 16:41:30 +10:00
Tom van Dijck
b3ad14a51c current -> host. 2017-04-24 13:01:31 -07:00
Tom van Dijck
5f589ad5a6 replaced:
os.get() -> os.target()
os.is() -> os.istarget()
_OS -> _TARGET_OS

added:
os.current()
os.iscurrent()
2017-04-24 13:01:31 -07:00
Sam Surtees
537392428d os.translateCommands now supports multiple tokens 2017-04-20 02:05:39 +10:00
Aleksi Juvani
479d51af81 Add JSON API (#729)
* Add JSON API
2017-04-04 09:02:59 -07:00
Jusonex
b2ec8b1b9a Use Schannel instead of mbedtls on Windows to avoid bundling CA certs
Also added a test that fails on the previous commit
2017-03-08 22:48:40 +01:00
Nikola Sprljan
d80e174774 Replaced Windows registry locations with the ones that should exist for all users, including the System one. This is to support running of unit tests in CI environments. (#697) 2017-02-21 09:16:22 -08:00
Tom van Dijck
0a7b45ce17 bring os.getversion() on par with the present (#688)
* bring os.getversion() on par with the present

* Use non-deprecated API's for Windows.

* Use Apple official names for MacOSX.
2017-02-01 09:19:13 -08:00