#!/bin/bash
# Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE_HW file.
#
# USE IN CI
# This script runs dart unit tests for changed packages based on PR_FILE_PATHS env var
# Get script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Check if Python 3 is available
if ! command -v python3 &> /dev/null; then
echo "[ERROR] Python 3 is required but not installed."
exit 1
fi
# Run the Python runner with unbuffered output
python3 -u "$SCRIPT_DIR/run_tests_for_changed_packages.py"
exit $?