Skip to content

Commit

Permalink
HSTR/HH reconciliation in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorka committed Aug 21, 2018
1 parent 5272671 commit 4c46770
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 25 deletions.
2 changes: 1 addition & 1 deletion build/test-gdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cd .. && make clean && qmake CONFIG+=hhdebug hh.pro && make && gdb ./hh
cd .. && make clean && qmake CONFIG+=hstrdebug hstr.pro && make && gdb ./hh

# eof
4 changes: 2 additions & 2 deletions build/test-memleaks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Run HSTR w/ 1 history entry to hunt memleaks w/ valgrind

# compile
cd .. && qmake CONFIG+=hhdebug hh.pro && make clean && make -j 8
cd .. && qmake CONFIG+=hstrdebug hstr.pro && make clean && make -j 8
if [ ${?} -ne 0 ]
then
exit 1
Expand All @@ -28,7 +28,7 @@ fi
export HISTFILE=`pwd`/test/resources/.bash_history_valgrind_1_entry

# Valgrind
valgrind --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hh -n hist
valgrind --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hstr -n hist
# Valgrind's GDB
#valgrind --vgdb=yes --vgdb-error=0 --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hstr -n hist

Expand Down
8 changes: 4 additions & 4 deletions build/test-units.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
./test-generate-unity-test-runner.sh

# compile
cd ../test && qmake hh-unit-tests.pro && make clean && make -j 8
cd ../test && qmake hstr-unit-tests.pro && make clean && make -j 8
if [ ${?} -ne 0 ]
then
exit 1
Expand All @@ -32,11 +32,11 @@ fi
# run
if [ ${OPTION_RUN_VALGRIND} ]
then
valgrind --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hh-unit-tests
valgrind --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hstr-unit-tests
# Valgrind's GDB
#valgrind --vgdb=yes --vgdb-error=0 --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hh-unit-tests
#valgrind --vgdb=yes --vgdb-error=0 --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hstr-unit-tests
else
./hh-unit-tests
./hstr-unit-tests
fi

# eof
4 changes: 2 additions & 2 deletions hstr.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hh.pro Qt project file for HSTR shell history compleation utility
# hstr.pro Qt project file for HSTR shell history compleation utility
#
# Copyright (C) 2014-2018 Martin Dvorak <[email protected]>
#
Expand All @@ -17,7 +17,7 @@
#########################################################################
#
# QMake build options:
# qmake CONFIG+=hhdebug ... add extra debug and profiling info
# qmake CONFIG+=hstrdebug ... add extra debug and profiling info
#
#########################################################################

Expand Down
2 changes: 1 addition & 1 deletion test/hstr-unit-tests.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hh-unit-tests.pro Qt project file of UNIT tests for HSTR
# hstr-unit-tests.pro Qt project file of UNIT tests for HSTR
#
# Copyright (C) 2014-2018 Martin Dvorak <[email protected]>
#
Expand Down
2 changes: 1 addition & 1 deletion test/resources/.bash_history_CZ
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ěščřžýáíé
ŘŠČŽ
./hh
./hstr
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/src/test.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
main.c UNIT tests main for HSTR shell history completion utility
test.c UNIT tests main for HSTR shell history completion utility
Copyright (C) 2014-2018 Martin Dvorak <[email protected]>
Expand Down
5 changes: 2 additions & 3 deletions test/test-bug124.sh → test/test-bug-124.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
# limitations under the License.

export HH_CONFIG=hicolor
export HISTFILE=/tmp/hh-bug-124
export HISTFILE=/tmp/hstr-bug-124

cp -vf ~/p/hstr/.bash_history_BUG_124 ${HISTFILE}
cp -vf ~/p/hstr/.bash_history_bug_124 ${HISTFILE}

#cd ~/p/hstr/github/hstr/Debug && gdbserver :9999 ./hh
#cd ~/p/hstr/github/hstr/Debug && ./hh
hh

# eof
7 changes: 3 additions & 4 deletions test/test-bug163.sh → test/test-bug-163.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
export HH_CONFIG=hicolor,regexp
export HISTFILE=/tmp/hh-bug-163

cp -vf ~/p/hstr/.bash_history_BUG_163 ${HISTFILE}
cp -vf ~/p/hstr/.bash_history_bug_163 ${HISTFILE}

#cd ~/p/hstr/github/hstr/Debug && gdbserver :9999 ./hh
cd ~/p/hstr/github/hstr/Debug && ./hh
#hh
#cd ~/p/hstr/github/hstr && gdbserver :9999 ./hh
cd ~/p/hstr/github/hstr && ./hstr

# eof
5 changes: 2 additions & 3 deletions test/test-bug175.sh → test/test-bug-175.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
infocmp | sed -e 's/[sr]mcup=[^,]*,//' > /tmp/noaltscreen-terminfo
tic -o ~/.terminfo/ /tmp/noaltscreen-terminfo

#cd ~/p/hstr/github/hstr/Debug && gdbserver :9999 ./hh
#cd ~/p/hstr/github/hstr/Debug && ./hh
#hh
#cd ~/p/hstr/github/hstr && gdbserver :9999 ./hstr
#cd ~/p/hstr/github/hstr && ./hstr
top

# eof
5 changes: 2 additions & 3 deletions test/test-bug176.sh → test/test-bug-176.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export HISTFILE=/tmp/hh-bug-176

cp -vf ~/p/hstr/github/hstr/tests/resources/.bash_history_BUG_176 ${HISTFILE}

#cd ~/p/hstr/github/hstr/Debug && gdbserver :9999 ./hh
#cd ~/p/hstr/github/hstr/Debug && ./hh
hh
#cd ~/p/hstr/github/hstr && gdbserver :9999 ./hstr
#cd ~/p/hstr/github/hstr && ./hstr

# eof
File renamed without changes.

0 comments on commit 4c46770

Please sign in to comment.