Skip to content

Commit

Permalink
tests/dep_tree: Make sure that tree is rebuilt when dependencies change
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Dec 7, 2024
1 parent 2b447ea commit 9623005
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/dep_tree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,16 @@ if ! diff $DEPS_TREE_PATH $DEPS_TREE_PATH.expected; then
echo "Dependency tree differed to the one expected." >&2
exit 1
fi

# Test changing dependencies.

cp tests/deps/build{.changed,}.fl
bob -C tests/deps dep-tree >/dev/null 2>/dev/null

echo "$DEP1" > $DEPS_TREE_PATH.expected
echo "\t$DEP2" >> $DEPS_TREE_PATH.expected

if ! diff $DEPS_TREE_PATH $DEPS_TREE_PATH.expected; then
echo "Dependency tree differed to the one expected." >&2
exit 1
fi
9 changes: 9 additions & 0 deletions tests/deps/build.changed.fl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2024 Aymeric Wibo

import bob

deps = [
Dep.local("dep1"),
# Dep.local("dep2"),
]

0 comments on commit 9623005

Please sign in to comment.