-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
48 lines (36 loc) · 1.4 KB
/
test.sh
File metadata and controls
48 lines (36 loc) · 1.4 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
#!/bin/bash
# test.sh - Create test files and run extstat
echo "📁 Creating test directory structure..."
# Create test directory
TEST_DIR="test_data"
rm -rf $TEST_DIR
mkdir -p $TEST_DIR
# Create various file types with different sizes
dd if=/dev/zero of=$TEST_DIR/large1.fastq bs=1M count=10 2>/dev/null
dd if=/dev/zero of=$TEST_DIR/large2.fastq bs=1M count=8 2>/dev/null
dd if=/dev/zero of=$TEST_DIR/large3.fastq bs=1M count=5 2>/dev/null
dd if=/dev/zero of=$TEST_DIR/genome1.fasta bs=1M count=3 2>/dev/null
dd if=/dev/zero of=$TEST_DIR/genome2.fasta bs=1M count=2 2>/dev/null
dd if=/dev/zero of=$TEST_DIR/data.bam bs=1M count=15 2>/dev/null
dd if=/dev/zero of=$TEST_DIR/script.py bs=1K count=50 2>/dev/null
dd if=/dev/zero of=$TEST_DIR/script.sh bs=1K count=20 2>/dev/null
dd if=/dev/zero of=$TEST_DIR/readme.txt bs=1K count=10 2>/dev/null
dd if=/dev/zero of=$TEST_DIR/notes.md bs=1K count=5 2>/dev/null
# Files without extension
dd if=/dev/zero of=$TEST_DIR/Makefile bs=1K count=2 2>/dev/null
dd if=/dev/zero of=$TEST_DIR/LICENSE bs=1K count=1 2>/dev/null
echo ""
echo "✅ Test files created in $TEST_DIR/"
echo ""
echo "📊 Running extstat..."
echo ""
# Build if not already built
if [ ! -f target/release/extstat ]; then
echo "🔨 Building extstat first..."
cargo build --release
echo ""
fi
# Run extstat on test data
./target/release/extstat $TEST_DIR -c
echo ""
echo "🧹 Cleanup: rm -rf $TEST_DIR"