2023-02-14 12:27:45 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-09-21 14:51:08 -04:00
|
|
|
set -eu -o pipefail
|
2023-02-14 12:27:45 -08:00
|
|
|
|
2023-02-21 10:15:33 -08:00
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
cd "$SCRIPT_DIR"/.. || exit 1
|
2023-02-16 08:45:50 -08:00
|
|
|
|
2023-04-11 00:11:50 -07:00
|
|
|
# NOTE(crag): sets number of tesseract threads to 1 which may help with more reproducible outputs
|
|
|
|
export OMP_THREAD_LIMIT=1
|
|
|
|
|
2023-09-21 14:51:08 -04:00
|
|
|
scripts=(
|
|
|
|
'test-ingest-s3.sh'
|
2023-10-03 14:31:28 -04:00
|
|
|
'test-ingest-s3-minio.sh'
|
2023-09-21 14:51:08 -04:00
|
|
|
'test-ingest-azure.sh'
|
2023-10-02 16:47:24 -04:00
|
|
|
'test-ingest-biomed-api.sh'
|
|
|
|
'test-ingest-biomed-path.sh'
|
|
|
|
## NOTE(yuming): The following test should be put after any tests with --preserve-downloads option
|
|
|
|
'test-ingest-pdf-fast-reprocess.sh'
|
2023-09-21 14:51:08 -04:00
|
|
|
'test-ingest-box.sh'
|
|
|
|
'test-ingest-discord.sh'
|
|
|
|
'test-ingest-dropbox.sh'
|
|
|
|
'test-ingest-github.sh'
|
|
|
|
'test-ingest-gitlab.sh'
|
|
|
|
'test-ingest-google-drive.sh'
|
|
|
|
'test-ingest-wikipedia.sh'
|
|
|
|
'test-ingest-local.sh'
|
|
|
|
'test-ingest-slack.sh'
|
|
|
|
'test-ingest-against-api.sh'
|
|
|
|
'test-ingest-gcs.sh'
|
|
|
|
'test-ingest-onedrive.sh'
|
|
|
|
'test-ingest-outlook.sh'
|
|
|
|
'test-ingest-elasticsearch.sh'
|
|
|
|
'test-ingest-confluence-diff.sh'
|
|
|
|
'test-ingest-confluence-large.sh'
|
|
|
|
'test-ingest-airtable-diff.sh'
|
2023-09-22 19:00:01 -07:00
|
|
|
# NOTE(ryan): This test is disabled because it is triggering too many requests to the API
|
|
|
|
# 'test-ingest-airtable-large.sh'
|
2023-09-21 14:51:08 -04:00
|
|
|
'test-ingest-local-single-file.sh'
|
|
|
|
'test-ingest-local-single-file-with-encoding.sh'
|
|
|
|
'test-ingest-local-single-file-with-pdf-infer-table-structure.sh'
|
|
|
|
'test-ingest-notion.sh'
|
|
|
|
'test-ingest-delta-table.sh'
|
|
|
|
'test-ingest-salesforce.sh'
|
|
|
|
'test-ingest-jira.sh'
|
|
|
|
'test-ingest-sharepoint.sh'
|
|
|
|
)
|
|
|
|
|
|
|
|
CURRENT_SCRIPT="none"
|
|
|
|
|
|
|
|
function print_last_run() {
|
|
|
|
if [ "$CURRENT_SCRIPT" != "none" ]; then
|
|
|
|
echo "Last ran script: $CURRENT_SCRIPT"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
trap print_last_run EXIT
|
|
|
|
|
|
|
|
for script in "${scripts[@]}"; do
|
|
|
|
CURRENT_SCRIPT=$script
|
2023-09-28 21:41:18 -05:00
|
|
|
if [[ "$CURRENT_SCRIPT" == "test-ingest-notion.sh" ]]; then
|
2023-09-22 00:19:21 -07:00
|
|
|
echo "--------- RUNNING SCRIPT $script --- IGNORING FAILURES"
|
|
|
|
set +e
|
|
|
|
echo "Running ./test_unstructured_ingest/$script"
|
|
|
|
./test_unstructured_ingest/"$script"
|
|
|
|
set -e
|
|
|
|
echo "--------- FINISHED SCRIPT $script ---------"
|
|
|
|
else
|
|
|
|
echo "--------- RUNNING SCRIPT $script ---------"
|
|
|
|
echo "Running ./test_unstructured_ingest/$script"
|
|
|
|
./test_unstructured_ingest/"$script"
|
|
|
|
echo "--------- FINISHED SCRIPT $script ---------"
|
|
|
|
fi
|
2023-09-21 14:51:08 -04:00
|
|
|
done
|