Files
Sergio Cazzolato 8235373461 Moving to tests directories snaps built locally - part 2
Script being used to detect which snaps can be moved to

for snap in $(ls tests/lib/snaps); do
    if [ -f "tests/lib/snaps/${snap}/snapcraft.yaml" ]; then
        echo "Exists file tests/lib/snaps/${snap}/snapcraft.yaml"
        continue
    fi

    count=0
    last=
    for test in $(find tests/ -name task.yaml); do
    	if $(grep -q $snap $test); then
    	    count=$((count+1))
    	    last=$test
    	fi
    done
    # echo "$snap -> $count times"
    if [ $count = 1 ]; then
	   echo "mv tests/lib/snaps/$snap $(dirname $last)"
    fi
done
2021-05-20 14:33:46 -03:00
..