Revert "Copy the repo before running any tests."

This reverts commit edae9ebd0e.
This commit is contained in:
Ramon Novoa 2017-02-08 08:18:33 +01:00
parent 3ef7c1a34e
commit 3dc44b4e1c
2 changed files with 7 additions and 12 deletions

View File

@ -3,4 +3,4 @@ variables:
test:
script:
- docker run --rm -h pandorafms -t -v "$CI_PROJECT_DIR:$CI_PROJECT_DIR" -e CI_PROJECT_DIR="$CI_PROJECT_DIR" pandorafms/pandorafms-base /tmp/pandorafms/tests/test.sh
- docker run --rm -h pandorafms -t -v "$CI_PROJECT_DIR:/tmp/pandorafms" pandorafms/pandorafms-base /tmp/pandorafms/tests/test.sh

View File

@ -1,11 +1,6 @@
#!/bin/bash
SOURCE_DIR="/tmp/pandorafms"
# Work on a clean directory when using GitLab CI.
if [ "$CI_PROJECT_DIR" != "" ]; then
cp -r "$CI_PROJECT_DIR" "$SOURCE_DIR"
fi
################################################
# Check the exit status of the last run command.
# Exits if it different from 0.
@ -28,24 +23,24 @@ service httpd start
check "Starting the Apache Web Server" $?
# Install the Pandora FMS Console.
cd $SOURCE_DIR/pandora_console && chmod +x pandora_console_install && yes | ./pandora_console_install --install
cd /tmp/pandorafms/pandora_console && chmod +x pandora_console_install && yes | ./pandora_console_install --install
check "Installing the Pandora FMS Console" $?
# Create the Pandora FMS database.
cd $SOURCE_DIR/tests && chmod +x install_console.py && ./install_console.py
cd /tmp/pandorafms/tests && chmod +x install_console.py && ./install_console.py
check "Creating the Pandora FMS Database" $?
# Build and install the Pandora FMS Server.
cd $SOURCE_DIR/pandora_server && perl Makefile.PL && make # Do not run make test now. Some tests need files created by pandora_server_installer.
cd /tmp/pandorafms/pandora_server && perl Makefile.PL && make # Do not run make test now. Some tests need files created by pandora_server_installer.
check "Building the Pandora FMS Server" $?
cd $SOURCE_DIR/pandora_server && chmod +x pandora_server_installer && ./pandora_server_installer --install
cd /tmp/pandorafms/pandora_server && chmod +x pandora_server_installer && ./pandora_server_installer --install
check "Installing the Pandora FMS Server" $?
sed -i -e 's/^dbuser.*/dbuser root/' /etc/pandora/pandora_server.conf
cd $SOURCE_DIR/pandora_server && make test
cd /tmp/pandorafms/pandora_server && make test
check "Running tests for the Pandora FMS Server" $?
# Install the Pandora FMS Agent.
cd $SOURCE_DIR/pandora_agents/unix && chmod +x pandora_agent_installer && ./pandora_agent_installer --install
cd /tmp/pandorafms/pandora_agents/unix && chmod +x pandora_agent_installer && ./pandora_agent_installer --install
check "Installing the Pandora FMS Agent" $?
# Start Pandora FMS services.