Skip to content

Commit

Permalink
testing >>>
Browse files Browse the repository at this point in the history
  • Loading branch information
BradleyA committed Feb 1, 2020
1 parent 70ad626 commit 4caa91f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions hooks/EXAMPLES/FVT-option-clean-hooks-001
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# hooks/EXAMPLES/FVT-option-clean-hooks-001 2.499.1431 2020-02-01T16:57:16.772113-06:00 (CST) https://github.com/BradleyA/git-TEST-commit-automation.git master uadmin five-rpi3b.cptx86.com 2.498
# testing >>>
# hooks/EXAMPLES/FVT-option-clean-hooks-001 2.498.1430 2020-02-01T16:30:00.755297-06:00 (CST) https://github.com/BradleyA/git-TEST-commit-automation.git master uadmin five-rpi3b.cptx86.com 2.497
# testing
# hooks/EXAMPLES/FVT-option-clean-hooks-001 2.453.1351 2020-01-30T20:58:56.329147-06:00 (CST) https://github.com/BradleyA/git-TEST-commit-automation.git master uadmin five-rpi3b.cptx86.com 2.452-2-g38c9e8d
Expand Down Expand Up @@ -90,7 +92,7 @@ fi
### Place test case here

# Create a directory that IS in the hooks directory and includes a file that DOES have EXAMPLES and custom test cases, and test case setup and cleanup scripts with one begin custom
# Test case types are custom and EXAMPLES test cases. Other files are test case setup and cleanup scripts with one begin custom and custom script
# Test case types are custom and EXAMPLES test cases. Other files are test case setup and cleanup scripts with one begin custom
if [[ "${DEBUG}" == "1" ]] ; then new_message "${LINENO}" "${YELLOW}INFO${WHITE}" " REPOSITORY_DIR is exported in post-commit script >${REPOSITORY_DIR}<" 1>&2 ; fi
COMMAND_NAME=$(echo "${0}" | sed 's/^.*\///')
mkdir -p "${REPOSITORY_DIR}"/hooks/tmp_DIR_"${COMMAND_NAME}"/TEST/tmp_CMD_"${COMMAND_NAME}"
Expand All @@ -104,6 +106,7 @@ ln -fs "${REPOSITORY_DIR}"/hooks/EXAMPLES/FVT-option-help-001 "${REPOSITOR
ln -fs "${REPOSITORY_DIR}"/hooks/EXAMPLES/FVT-option-version-001 "${REPOSITORY_DIR}"/hooks/tmp_DIR_"${COMMAND_NAME}"/TEST/tmp_CMD_"${COMMAND_NAME}"/FVT-option-version-001
echo "#!/bin/bash" > "${REPOSITORY_DIR}"/hooks/tmp_DIR_"${COMMAND_NAME}"/TEST/tmp_CMD_"${COMMAND_NAME}"/SA-custom-test-case-001
echo "#!/bin/bash" > "${REPOSITORY_DIR}"/hooks/tmp_DIR_"${COMMAND_NAME}"/TEST/tmp_CMD_"${COMMAND_NAME}"/FVT-custom-test-case-001
# Create custom file
echo "#!/bin/bash" > "${REPOSITORY_DIR}"/hooks/tmp_DIR_"${COMMAND_NAME}"/tmp_CMD_"${COMMAND_NAME}"
if [[ "${DEBUG}" == "1" ]] ; then new_message "${LINENO}" "${YELLOW}INFO${WHITE}" " COMMAND_NAME >${COMMAND_NAME}< ${REPOSITORY_DIR}/tmp.${COMMAND_NAME}" 1>&2 ; fi

Expand All @@ -116,11 +119,15 @@ if [[ "${DEBUG}" == "0" ]] ; then # Don't remove when in DEBUG modes
fi

# MUST restore deleted test cases because git-TEST-cases.sh -c --hooks , just deleted them
if [[ -x "FVT-setup.sh" ]] ; then ./FVT-setup.sh ; fi
if [[ -x "SA-setup.sh" ]] ; then ./SA-setup.sh ; fi
echo ">>> <<<"
pwd
echo ">>> <<<"
## echo "#!/bin/bash" > "${REPOSITORY_DIR}"/hooks/tmp_DIR_"${COMMAND_NAME}"/TEST/tmp_CMD_"${COMMAND_NAME}"/FVT-setup.sh
## if [[ -x "${REPOSITORY_DIR}"/hooks/tmp_DIR_"${COMMAND_NAME}"/TEST/tmp_CMD_"${COMMAND_NAME}"/FVT-setup.sh ]] ; then ./FVT-setup.sh ; fi
## if [[ -x "SA-setup.sh" ]] ; then ./SA-setup.sh ; fi

if [[ -s ${1} ]] ; then # file size is greater than zero
if [[ "${FILE_COUNT}" == 7 ]] ; then # Directory had 11 files (11-4=7), --c/-clean then removed/cleaned all EXAMPLES test cases. Setup, cleanup, and custom are not removed
if [[ "${FILE_COUNT}" == 6 ]] ; then # Directory had 10 files (10-4=6), --c/-clean then removed/cleaned all EXAMPLES test cases. Setup, cleanup, and custom are not removed
RETURN_CODE=0
else
RETURN_CODE=1
Expand Down
4 changes: 2 additions & 2 deletions hooks/bin/git-TEST-cases.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# hooks/bin/git-TEST-cases.sh 2.498.1430 2020-02-01T16:30:01.200319-06:00 (CST) https://github.com/BradleyA/git-TEST-commit-automation.git master uadmin five-rpi3b.cptx86.com 2.497
# testing
# hooks/bin/git-TEST-cases.sh 2.499.1431 2020-02-01T16:57:16.980944-06:00 (CST) https://github.com/BradleyA/git-TEST-commit-automation.git master uadmin five-rpi3b.cptx86.com 2.498
# testing >>>
# hooks/bin/git-TEST-cases.sh 2.489.1409 2020-02-01T10:14:36.146530-06:00 (CST) https://github.com/BradleyA/git-TEST-commit-automation.git master uadmin five-rpi3b.cptx86.com 2.488
# hooks/EXAMPLES/FVT-option-filename-001-006 Updated user message
# hooks/bin/git-TEST-cases.sh 2.435.1326 2020-01-28T10:11:57.566271-06:00 (CST) https://github.com/BradleyA/git-TEST-commit-automation.git master uadmin five-rpi3b.cptx86.com 2.434
Expand Down

0 comments on commit 4caa91f

Please sign in to comment.