Skip to content

Commit

Permalink
add rt-test app
Browse files Browse the repository at this point in the history
  • Loading branch information
rcitach committed Nov 5, 2024
2 parents 0f51c89 + ebd56bd commit 5119358
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
33 changes: 33 additions & 0 deletions apps/rt-tests/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-- Licensed under the Apache License, Version 2.0 (the "License");
-- You may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-- Copyright (C) 2022-2023 RT-Thread Development Team
--
-- @author xqyjlj
-- @file xmake.lua
--
-- Change Logs:
-- Date Author Notes
-- ------------ ---------- -----------------------------------------------
-- 2023-06-21 xqyjlj initial version
--

add_rules("mode.debug", "mode.release")

add_requires("rt-tests")

target("rt-tests")
do
set_kind("phony")
add_packages("rt-tests")
end
target_end()
8 changes: 6 additions & 2 deletions tools/scripts/modules/rt/rt_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ function cp_with_symlink(srcpath, dstpath, opt)
else
option = opt or {symlink = true}
end
os.tryrm(dstpath)
os.vcp(srcpath, dstpath, option)
if (opt and opt.del == false) then
os.execv("cp -r", {srcpath, dstpath})
else
os.tryrm(dstpath)
os.vcp(srcpath, dstpath, option)
end
end

function dirsize(dir)
Expand Down

0 comments on commit 5119358

Please sign in to comment.