diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2019-09-02 14:32:54 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2019-09-03 14:56:49 -0300 |
commit | 96b6b9ca9cf77922863d440247850b6b7c4bb9ae (patch) | |
tree | f090af9c1d03c21bf3ba8f6d556b17f7630e3a57 /spec/util | |
parent | 989c58dff675532cf6378ade3790fd7e28e5bc07 (diff) | |
download | luarocks-96b6b9ca9cf77922863d440247850b6b7c4bb9ae.tar.gz luarocks-96b6b9ca9cf77922863d440247850b6b7c4bb9ae.tar.bz2 luarocks-96b6b9ca9cf77922863d440247850b6b7c4bb9ae.zip |
build: fix --branch flag
The `--branch` flag is optional and takes a string argument.
The `--branch` flag does not make sense for `luarocks make` because
it does not fetch sources, it builds/installs based on whatever is
in the current directory.
This also adds tests that verify the behavior, but these don't
run in Travis CI because of issues running a Git daemon there.
They were verified locally.
Diffstat (limited to 'spec/util')
-rw-r--r-- | spec/util/git_repo.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/util/git_repo.lua b/spec/util/git_repo.lua index 6cccfcc4..b3ddd9ef 100644 --- a/spec/util/git_repo.lua +++ b/spec/util/git_repo.lua | |||
@@ -82,6 +82,7 @@ function git_repo.start() | |||
82 | test_env.execute("git add " .. name) | 82 | test_env.execute("git add " .. name) |
83 | end | 83 | end |
84 | assert(test_env.execute("git commit -a -m 'initial commit'")) | 84 | assert(test_env.execute("git commit -a -m 'initial commit'")) |
85 | assert(test_env.execute("git branch test-branch")) | ||
85 | print("git daemon --reuseaddr --pid-file="..pidfile.." --base-path="..basedir.." --export-all "..repodir.." &") | 86 | print("git daemon --reuseaddr --pid-file="..pidfile.." --base-path="..basedir.." --export-all "..repodir.." &") |
86 | assert(test_env.execute("git daemon --reuseaddr --pid-file="..pidfile.." --base-path="..basedir.." --export-all "..repodir.." &")) | 87 | assert(test_env.execute("git daemon --reuseaddr --pid-file="..pidfile.." --base-path="..basedir.." --export-all "..repodir.." &")) |
87 | assert(test_env.execute("sleep 0.1; netstat -ln | grep '0.0.0.0:9418 .* LISTEN'")) | 88 | assert(test_env.execute("sleep 0.1; netstat -ln | grep '0.0.0.0:9418 .* LISTEN'")) |