# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-CURDIR=$(dirname $0)/
-ROOTDIR=$CURDIR/../..
-$CURDIR/test_ctf_writer $ROOTDIR/formats/ctf/metadata/ctf-parser-test $ROOTDIR/converter/babeltrace
+NO_SH_TAP=1
+. "@abs_top_builddir@/tests/utils/common.sh"
+
+curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
+
+"${curdir}/test_ctf_writer" "$BT_BIN"