Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the behat command to use depending on whether ddev is available. #180

Merged
merged 1 commit into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion defaults/install/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

<!-- Target: behat -->
<target name="behat" description="Run the Behat tests.">
<property name="behat.command" value="vendor/bin/behat ${behat.args}" />
<property name="behat.command" value="${behat.bin} ${behat.args}" />
<echo msg="$> ${behat.command}" />
<exec command="${behat.command}" logoutput="true" checkreturn="true" />
</target>
Expand Down
7 changes: 5 additions & 2 deletions targets/the-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@
<!-- Use the project directory name as the project name, if it's not configured. -->
<basename property="projectname" file="${build.dir}" suffix="local" />

<!-- Configure the 'drush' Phing task. By default, we run the installed drush. -->
<!-- Configure binaries to run depending on whether we're inside of ddev or out. -->
<property name="drush.bin" value="${build.dir}/vendor/bin/drush" />
<!-- If this is a ddev project, and we're outside of ddev, run ddev's drush command instead. -->
<property name="behat.bin" value="${build.dir}/vendor/bin/behat" />

<!-- If this is a ddev project, and we're outside of ddev, run these commands within ddev. -->
<exec command="which ddev" returnProperty="which_ddev" />
<if>
<and>
Expand All @@ -99,6 +101,7 @@
</and>
<then>
<property name="drush.bin" value="ddev drush" override="true" />
<property name="behat.bin" value="ddev . vendor/bin/behat" override="true" />
</then>
</if>

Expand Down