diff --git a/doc/first_steps_with_git b/doc/first_steps_with_git index 82e9760..3bacd48 100644 --- a/doc/first_steps_with_git +++ b/doc/first_steps_with_git @@ -63,13 +63,49 @@ Merge request ------------- Your push (or pushes) to git need to be merged with the t_functional master. This is done with the web-interface. On the webpage of your clone - something like https://gitorious.org/<>/testautomation/<> - press the button "Request merge". Add some comments/notes, scroll down and select your commits up to the point you want to merge (you can keep the dropdown menues unchanged). "Create merge request" will do just that. On https://gitorious.org/testautomation/t_functional you will now find the number of "Merge requests" being increased by 1. Clicking on "Merge Requests" will show you all current and previous requests (possible states are Open, In Review and Closed). - Keeping in sync --------------- With time your gitorious clone and your local copy will drift from the t_functional master (you work on your copy and others work on their copies/master, pushes/commits and merge request happen and so on). The best way to deal with this is to do a local merge of the current master and your local copy: -"git fetch upstream" will fetch the current master from gitorious. +"git fetch upstream" will fetch the current t_functional master from gitorious. "git merge upstream/master" will now merge your local copy with the previously fetched master. This effectively writes all master changes to your local copy. +If you work on two different machines - assuming you commit your work after it is done - you can do something similar to keep your second machine in sync with your work and not always have to delete your local copy and do a "git clone ..." again: +"git fetch origin" will fetch the current master of YOUR t_functional-clone from gitorious (not the t_functional master). +"git merge origin/master" will now update your local copy to the latest commit you pushed to gitorious. + +During these operations you will also see the "version" numbers of the various commits. i.e.: +>> +me@centos:~/t_functional>git fetch origin +remote: Counting objects: 17, done. +remote: Compressing objects: 100% (9/9), done. +remote: Total 9 (delta 6), reused 0 (delta 0) +Unpacking objects: 100% (9/9), done. +From gitorious.org:~<>/testautomation/<>s-t_functional + 4a5d56d..33951fe master -> origin/master +>> +The fetch operation downloaded the differences from 4a5d56d to 33951fe and put them in origin/master. + +>> +me@centos:~/t_functional>git merge origin/master +Updating 4a5d56d..33951fe +Fast-forward + tests/p_freeradius/0-install_freeradius.sh | 4 ++-- + tests/p_gcc/test_gcc.sh | 11 ++--------- + tests/p_php/10-php-test.sh | 3 +-- + 3 files changed, 5 insertions(+), 13 deletions(-) +>> +Now my local copy should match the data available online. + +At the time of writing this 33951fe is also the latest version available on the t_functional - master so: +>> +me@centos:~/t_functional> git merge upstream/master +Already up-to-date. +>> +There is no difference between the t_functional clone and the t_functiomal master so 'Already up-to-date' (as the last push to the master was the authors last commit to his clone and a subsequent merge request). + +Last ressort +------------ + If - for any reason - you are unable to sync your repos correctly, you can always delete your clone at gitorious and create a new one. diff --git a/tests/p_php/20-php-mysql-test.sh b/tests/p_php/20-php-mysql-test.sh index 55d5c11..9437799 100755 --- a/tests/p_php/20-php-mysql-test.sh +++ b/tests/p_php/20-php-mysql-test.sh @@ -25,7 +25,6 @@ flush privileges; EOF mysql <$CREATE -/bin/rm $CREATE # create PHP Script and write something into DB INSERT='/var/tmp/test.php' @@ -47,7 +46,7 @@ EOF php $INSERT if [ $? -ne 0 ] then - t_Log FAIL + t_Log "Inserting into DB failed" exit 1 fi @@ -73,3 +72,5 @@ php $READ | grep -q '1' t_CheckExitStatus $? +#cleaning up +/bin/rm $READ $CREATE $INSERT diff --git a/tests/p_python/0-install-python.sh b/tests/p_python/0-install-python.sh new file mode 100755 index 0000000..d102bb6 --- /dev/null +++ b/tests/p_python/0-install-python.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author: Christoph Galuschka + +# Install python +t_Log "Running $0 - installing python." + +t_InstallPackage python diff --git a/tests/p_python/10-test_python.sh b/tests/p_python/10-test_python.sh new file mode 100755 index 0000000..17b1452 --- /dev/null +++ b/tests/p_python/10-test_python.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# Author: Christoph Galuschka +# Athmane Madjodj + +t_Log "Running $0 - python can print Hello World" + +# creating source file +FILE='/var/tmp/python-test.py' + +cat > $FILE < +# Author: Christoph Galuschka +# reusing the script from LAMP-Tests + +t_Log "Running $0 - python can retrieve mysql-server version information." + +# we need a working and running mysql server +t_InstallPackage mysql-server +t_ServiceControl mysqld start >/dev/null 2>&1 + +# Installing additional python/mysql module +t_InstallPackage MySQL-python + +# create python Scrip +SCRIPT='/var/tmp/test.py' + +cat >$SCRIPT <