Blame tests/p_git/12-test_git_log.sh
|
Pratima, Madhurranjan, Nilesh |
aa2e40 |
#!/bin/bash
|
|
Pratima, Madhurranjan, Nilesh |
aa2e40 |
|
|
Pratima, Madhurranjan, Nilesh |
aa2e40 |
# Author: Pratima Singh <prati.86@gmail.com>, Nilesh Bairagi <nileshbairagi@gmail.com>, Madhurranjan Mohaan <madhurranjan.mohaan@gmail.com>
|
|
Christoph Galuschka |
3002b6 |
# Christoph Galuschka <christoph.galuschka@chello.at>
|
|
Pratima, Madhurranjan, Nilesh |
aa2e40 |
|
|
Christoph Galuschka |
3002b6 |
t_Log "Running $0 - testing git logging and commit messages"
|
|
Christoph Galuschka |
3002b6 |
|
|
|
e9f3b0 |
if [ $centos_ver -ge 6 ]
|
|
Christoph Galuschka |
3002b6 |
then
|
|
Christoph Galuschka |
3002b6 |
# Testing git log and git commit msgs
|
|
Christoph Galuschka |
3002b6 |
workpath=$(pwd)
|
|
Christoph Galuschka |
3002b6 |
rm -rf /tmp/temprepo/ /tmp/cloned_repo/
|
|
Christoph Galuschka |
3002b6 |
temp_repo="/tmp/temprepo"
|
|
Christoph Galuschka |
3002b6 |
mkdir -p $temp_repo
|
|
Christoph Galuschka |
3002b6 |
cd $temp_repo
|
|
Christoph Galuschka |
3002b6 |
git init . --bare
|
|
Christoph Galuschka |
3002b6 |
cd /tmp
|
|
Christoph Galuschka |
3002b6 |
git clone $temp_repo cloned_repo
|
|
Christoph Galuschka |
3002b6 |
cd cloned_repo
|
|
|
e9f3b0 |
git config user.email "centos@centos.org"
|
|
|
e9f3b0 |
git config user.name "t_functional tests"
|
|
Christoph Galuschka |
3002b6 |
echo "hello world" > hello
|
|
Christoph Galuschka |
3002b6 |
git add hello
|
|
Christoph Galuschka |
3002b6 |
git commit -m "Temp commit" 2>&1
|
|
Christoph Galuschka |
3002b6 |
git log --grep="Temp commit" 2>&1
|
|
Christoph Galuschka |
3002b6 |
ret_val=$?
|
|
Christoph Galuschka |
3002b6 |
cd $workpath
|
|
Christoph Galuschka |
3002b6 |
else
|
|
Christoph Galuschka |
3002b6 |
t_Log "This test is skipped in CentOS5."
|
|
Christoph Galuschka |
3002b6 |
ret_val=0
|
|
Christoph Galuschka |
3002b6 |
fi
|
|
Christoph Galuschka |
3002b6 |
|
|
Christoph Galuschka |
3002b6 |
t_CheckExitStatus $ret_val
|