Spell check on commit message support for CI

- This commit would add the codespell package while
  building the base container.

- The intention is that, we maintain two dictionaries
  1. That comes directly with codespell
    - We should also download the latest dictionary while
      while building the base container.
  2. An openbmc spellings dictionary
    - We should be able to add words and spellings that are
      openbmc related in this dictionary over time.

- When the commit message have words that the dictionary does not have,
the CI proceeds further without any rejection. The CI only scores a -1 if
it sees a word wrongly spelled from it knowledge from the dictionary.

Tested by:

1. when commit message have mistakes: It breaks & scores a -1
   It also highlights the spelling mistake and the correct spelling
   to be used.

2. when commit message does not have mistakes : it does not break &
   proceeds further for compilation.

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I87278597876b6e2b0a59e297cde020631491b5fd
diff --git a/run-unit-test-docker.sh b/run-unit-test-docker.sh
index 9c7bc49..2a44264 100755
--- a/run-unit-test-docker.sh
+++ b/run-unit-test-docker.sh
@@ -31,8 +31,10 @@
 BRANCH=${BRANCH:-"master"}
 OBMC_BUILD_SCRIPTS="openbmc-build-scripts"
 UNIT_TEST_PY_DIR="scripts"
+DICTIONARY_DIR="dictionary"
 UNIT_TEST_PY="unit-test.py"
 FORMAT_CODE_SH="format-code.sh"
+SPELLINGS_TXT="openbmc-spelling.txt"
 DBUS_UNIT_TEST_PY="dbus-unit-test.py"
 TEST_ONLY="${TEST_ONLY:-}"
 DBUS_SYS_CONFIG_FILE=${dbus_sys_config_file:-"/usr/share/dbus-1/system.conf"}
@@ -73,6 +75,10 @@
 "${WORKSPACE}"/${FORMAT_CODE_SH}
 chmod a+x "${WORKSPACE}"/${FORMAT_CODE_SH}
 
+# Copy spellings.txt file into workspace
+cp "${WORKSPACE}"/${OBMC_BUILD_SCRIPTS}/${DICTIONARY_DIR}/${SPELLINGS_TXT} \
+"${WORKSPACE}"/${SPELLINGS_TXT}
+
 # Configure docker build
 cd "${WORKSPACE}"/${OBMC_BUILD_SCRIPTS}
 echo "Building docker image with build-unit-test-docker"