Commit Graph

34 Commits (76c71a9120a3f1f66b2fd38e21a84b3c9283133a)

Author SHA1 Message Date
Lukas Sismis e101384e7b transversal: remove suricata-ids.org references 2 years ago
Jeff Lucovsky 1eeb96696b general: Cleanup bool usage 4 years ago
Eric Leblond 48c30efd34 prscript: port to python 3 4 years ago
jason taylor 143f08fa7a prscript: update copyright dates and FSF address
Signed-off-by: jason taylor <jtfas90@gmail.com>
4 years ago
Philippe Antoine b0f6737c10 python: style for prscript
Remove unnecessary pass
Remove unused variable
5 years ago
Eric Leblond 7ee989a3ab prscript: update urls to use OISF repo 7 years ago
Eric Leblond 620f2540c6 prscript: update docker code
Update docker code to latest docker python API. This patch
preserves backwrd compatibility with older versions.
7 years ago
Eric Leblond bfa90a64d5 prscript: fix error handling
Last result was used as global result.
9 years ago
Eric Leblond 50b33ad508 prscript: update logic of sync with master test
Code now get master sha on github and check if it is in current
branch with a git command. It also sync first that the current
local branch is in sync with github corresponding branch.

Signed-off-by: Eric Leblond <eric@regit.org>
9 years ago
Eric Leblond b85901a6b4 prscript: add rm command
This command removes the container and the image allowing to
free the disk space allocated during the creation.
9 years ago
Eric Leblond 35c1b681ee prscript: docker do not need sudo
Usage is not to run docker command as root but to have the user
in the docker group to be able to run docker commands.
9 years ago
Eric Leblond f7a25f2b24 prscript: rework option logic
Handle cleanly the case where user start docker handling command
without having the dependency installed. The help message does
now say:

```
  -d, --docker          use docker based testing
  -C, --create          create docker container (disabled)
  -s, --start           start docker container (disabled)
  -S, --stop            stop docker container (disabled)

You need to install Python docker module to enable docker container handling
options.
```

And running a disabled options says:

```
$ qa/prscript.py -s
You need to install python docker to use docker handling features.
```
10 years ago
Eric Leblond 0b64b992c9 prscript: fix error message in non local test
Indicate to user that non local test needs a github user.
10 years ago
Eric Leblond 8a0ebc4ade prscript: improve command line
You can now directly access to docker related command:

 qa/prscript.py -C # create container
 qa/prscript.py -s # start container
 qa/prscript.py -S # stop container

The build option does not change:

 qa/prscript.pu -l -d MY_BRANCH # build test of branch MY_BRANCH
10 years ago
Eric Leblond fe45f2a342 prscript: add notification system
If Python pynotify is installed, prscript can now send notification
via the -n flag.
10 years ago
Eric Leblond ef627816cc prscript: improve wordings 10 years ago
Eric Leblond a3c921f0a6 prscript: suppress useless message
No build run faster than 2 seconds.
10 years ago
Eric Leblond fbe5db500c prscript: iterate on builds when checking status
This patch is changing the logic when using docker mode. We are
iterating over each builds so we know when one build is over in
the 5 seconds following the event instead of getting the result
when the builds that are checked before are others.

On OISF's build system, the two builds comes out in order so there
is no problem.
10 years ago
Eric Leblond f12e6fdcda prscript: read buildbot config from source
This patch change the logic of the Docker buildbot system. The
buildbot configuration is now the one available in qa/docker
directory.

This way, developers can test features in docker buildbot that
could require some specific flags to be set. They just need to
edit the buildbot.cfg for instance to enable a new feature.

In the same way, the tested pcap files are the one which are in
the qa/docker/pcaps/ directory. So to test some private ones it is
enough to put them in that directory.

To take into consideration a buildbot.cfg modification or a new
pcap, it is enough to stop and restart the container:

 sudo qa/prscript.py -l -d -S master
 sudo qa/prscript.py -l -d -s master

This patch also fixes the container update issue. A local modification
to the buildbot will be kept. It is also fixing the issue when working
on old code that could possibly not support the same build flag as
the one of buildbot. Here the configuration will remains in sync.
10 years ago
Eric Leblond be473fa712 prscript: add a comment on the SELinux issue 10 years ago
Eric Leblond 1180fc1ac7 prscript: add docker handling support
You can now create the docker image necessary to run a
suricata builbot in docker. To do that you need to have
docker and python-docker installed on the system.

Then you can go to the qa directory.

You need to run once the creattion procedure:
 sudo ./prscript.py  -C -d master  -l
This will create a container named 'suri-buildbot'.

You can start it with:
 sudo ./prscript.py  -s -d master  -l

And stop it with:
 sudo ./prscript.py  -S -d master  -l

To start a test, you can do:
 ./prscript.py -d my_branch -l
10 years ago
Eric Leblond dd6f9a6298 prscript: refactor for docker
With the current work in progress on docker we need to update the
script to handle this case.

This patch adds two options:
 - -d to run in docker mode. In that case the build is started in
 the local dockerized buildbot instance
 - -l to not test the tested branch synchronization with github.

The -l option allows user to run a complete test without publishing
the code on github and without Internet access.
10 years ago
Jason Ish 754ea3d849 prscript - fallback to json is simplejson not available. 10 years ago
Eric Leblond 4b9eecc7f6 prscript: update URL
Buildbot server has been moved to another box.
10 years ago
Eric Leblond 55108167e5 prscript: add --norebase option
If --norebase option is provided, the prscript will start a build
that can be used to check if an out-of-sync branch pass the test.
11 years ago
Eric Leblond 5a7ad5b382 qa: prscript now output pastable line for PR. 11 years ago
Eric Leblond a8fde0112e prscript: add support for pcap build
Now also start a pcap test build.
11 years ago
Eric Leblond 013e7a0573 prscript: update code following buildbot upgrade
The authentication scheme did change on the buildbot due to a
software upgrade. This patch update prscript.py to fix the build
submission.
11 years ago
Eric Leblond fa861b09ac prscript: support bigger PR
The script now looks for originan HEAD in 100 commits instead of 30.
It should be enough becasue a sane PR should not have 100 commits.
11 years ago
Eric Leblond ad1546d59a prscript: display url where user can watch build 11 years ago
Eric Leblond 8a96296b4a prscript: add verbose option 11 years ago
Eric Leblond f23556dcdb prscript: exit when no build exists 11 years ago
Eric Leblond c151b218f1 prscript: check if branch is synced with master
The script now check if the tested branch is in sync with current
inliniac's master.
11 years ago
Eric Leblond c390006aee script: add script to start personal builder
This script HAS to be used by developer having an account on Suricata
buildbot. It MUST be run before doing a PR. It will trigger a build on
the branch and this will check the validity of the proposed branch.
The cinematic is simple:
 - Push branch XXX to github
 - Run 'prscript.py -u USER -p PASSWORD XXX'
 - Wait for the result
 - If successful, PR can be done
11 years ago