Skip to content

Commit 97098c2

Browse files
liuguo09xiaoxiang781216
authored andcommitted
cibuild.sh: use pushd/popd to make sure testlist path correctly
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
1 parent 0c4126b commit 97098c2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cibuild.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ function enable_ccache {
152152
}
153153

154154
function setup_repos {
155+
pushd .
155156
if [ -d "$nuttx" ]; then
156157
cd $nuttx; git pull
157158
else
@@ -163,23 +164,23 @@ function setup_repos {
163164
else
164165
git clone https://github.com/apache/incubator-nuttx-apps.git $apps
165166
fi
167+
popd
166168
}
167169

168170
function install_tools {
171+
pushd .
169172
for func in $install; do
170173
$func
171174
done
175+
popd
172176
}
173177

174178
function run_builds {
175179
local ncpus=`grep -c ^processor /proc/cpuinfo`
176180
options+="-j $ncpus"
177181

178182
for build in $builds; do
179-
local builddir=$(cd $(dirname $build) && pwd)
180-
local buildfile=$(basename $build)
181-
182-
$nuttx/tools/testbuild.sh $options $builddir/$buildfile
183+
$nuttx/tools/testbuild.sh $options $build
183184
done
184185
}
185186

0 commit comments

Comments
 (0)