#!/bin/bash

MODULES=(
  sorting
  lists
)

export GOPATH=(pwd)

pushd src/ads > /dev/null
for module in ${MODULES[@]}
do
  echo "--------------------------------------------------"
  echo "Module: $module"
  echo "--------------------------------------------------"

  pushd $module > /dev/null
  go test -v
  popd > /dev/null
done
popd > /dev/null

#!/bin/bash

MODULES=(
  sorting
  lists
)

export GOPATH=(pwd)

if [ "$#" -eq 0 ]; then
  TEST_MODULES=${MODULES[@]}
else
  TEST_MODULES=( $@ )
fi

pushd src/ads > /dev/null
for module in ${TEST_MODULES[@]}
do
  echo "--------------------------------------------------"
  echo "Module: $module"
  echo "--------------------------------------------------"

  pushd $module > /dev/null
  go test -v
  popd > /dev/null
done
popd > /dev/null

Allow to execute only golang tests for the specified modules
Allow to execute only golang tests for the specified modules
