-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestKuick.sh
More file actions
executable file
·79 lines (60 loc) · 2.13 KB
/
TestKuick.sh
File metadata and controls
executable file
·79 lines (60 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
# KORE RISC-V Compiler - Kuick Test Script
# This script builds and runs tests for the Kuick components
set -e # Exit on any error
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Function to print colored output
print_status() {
echo -e "${BLUE}[INFO]${NC} $1"
}
print_success() {
echo -e "${GREEN}[SUCCESS]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARNING]${NC} $1"
}
print_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
# Check if dotnet is installed
if ! command -v dotnet &> /dev/null; then
print_error "dotnet CLI is not installed. Please install .NET SDK first."
print_status "Visit: https://docs.microsoft.com/en-us/dotnet/core/install/linux"
exit 1
fi
# Display dotnet version
print_status "Using .NET SDK version: $(dotnet --version)"
# Configuration (default to Debug, can be overridden)
CONFIGURATION=${1:-Debug}
print_status "Testing Kuick components in $CONFIGURATION configuration"
# Navigate to source directory
cd "$(dirname "$0")/src"
# Build dependencies first
print_status "Building Kuick dependencies..."
# Build Kore.Utility
print_status "Building Kore.Utility..."
dotnet build Kore.Utility/Kore.Utility.csproj --configuration $CONFIGURATION --verbosity minimal
# Build Kore.AST
print_status "Building Kore.AST..."
dotnet build Kore.AST/Kore.AST.csproj --configuration $CONFIGURATION --verbosity minimal
# Build Kore.RiscMeta
print_status "Building Kore.RiscMeta..."
dotnet build Kore.RiscMeta/Kore.RiscMeta.csproj --configuration $CONFIGURATION --verbosity minimal
# Build Kore.Kuick
print_status "Building Kore.Kuick..."
dotnet build Kore.Kuick/Kore.Kuick.csproj --configuration $CONFIGURATION --verbosity minimal
# Build and run Kore.Kuick.Tests
print_status "Building and running Kore.Kuick.Tests..."
dotnet test Kore.Kuick.Tests/Kore.Kuick.Tests.csproj --configuration $CONFIGURATION --verbosity normal
if [ $? -eq 0 ]; then
print_success "Kuick tests completed successfully!"
else
print_error "Kuick tests failed!"
exit 1
fi
print_status "Kuick test artifacts location: Kore.Kuick.Tests/bin/$CONFIGURATION"