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

CMAKE_CLANG_TIDY #125

Merged
merged 1 commit into from
Oct 16, 2024
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
39 changes: 31 additions & 8 deletions .github/tour.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sudo apt-get update
sudo apt-get install --yes cmake ninja-build binutils libc6{,-dev}
pip3 install conan
conan profile detect || echo "Profile detection failed. Perhaps the default profile already existed - perhaps this user has already done some conan-based builds."
sed -i 's,compiler.cppstd=.*$,compiler.cppstd=20,' `conan profile path default`
sed -i 's,compiler.cppstd=.*$,compiler.cppstd=20,' "$(conan profile path default)"
conan profile show

echo Build conan library
Expand All @@ -38,7 +38,7 @@ echo Build clitester
cmake --build tester_build --config Release

echo Start test server
( timeout 600 python3 ./ipfs_chromium/test_data/test_server.py 8080 2>&1 | tee server.log & ) &
( (timeout 1999 python3 ./ipfs_chromium/test_data/test_server.py 8080 2>&1 ; echo -e '\n LOCALHOST SERVER EXITING FROM TIMEOUT \n ') | tee server.log & ) &
for t in 1{0..9}
do
if grep -n . server.log
Expand All @@ -59,20 +59,24 @@ function url_case() {
echo "test case description =${4}"
ll="${5-note}"
echo "log level = ${ll}"
if timeout 420 ./tester_build/clitester "${ll}" "${1}://${2}"
set +e
timeout 442 ./tester_build/clitester "${ll}" "${1}://${2}"
ec=$?
set -e
if [ ${ec} -eq 0 ]
then
echo clitester exited with successful status
else
echo "Directly reported error code from clitester run - usually means timeout killed it. " "${@}"
exit 7
echo "Directly reported error code ${ec} from clitester run - usually means timeout killed it. " "${@}"
exit 6
fi
n=`sed 's,[^A-Za-z0-9\.],_,g' <<< ${2}`
n="${2//[^A-Za-z0-9\.]/_}"
if [ ! -f "_${1}_${n}" ]
then
echo "Failed to produce expected file _${1}_${n} for test case " "${@}"
ls -lrth
exit 7
elif cat "_${1}_${n}" | md5sum | cut -d ' ' -f 1 > actual
elif md5sum < "_${1}_${n}" | cut -d ' ' -f 1 > actual
then
ls -lrth _ip?s_*
if [ $# -ge 3 ]
Expand All @@ -95,13 +99,32 @@ function url_case() {
fi
}

unstable_case() {
set +e
timeout 405 ./tester_build/clitester "ipns://${1}"
ec=$?
set -e
if [ ${ec} -ne 0 ]
then
echo "clitester (or timeout) failed with exit code ${ec} for ipns://${1}"
exit 5
fi
n="${1//[^A-Za-z0-9\.]/_}"
if ! grep "${2}" "_ipns_${n}"
then
echo "Was not able to find '${2}' in output for ipns://${1}"
grep -n . "_ipns_${n}"
exit 4
fi
}

url_case ipfs bafybeifx4tcpzbw7tzhwfbzsofgoana6cy7xbt64e3u6itve44c5zelpmm/symlinks/sub/dotdot.txt cfe9b69523140b5b5e63874a8e4997e4 'A symbolic link whose target includes ..'
url_case ipfs bafkqacdjmrsw45djor4q ff483d1ff591898a9942916050d2ca3f 'Identity (inlined) CID'
url_case ipfs baguqeerah2nswg7r2pvlpbnsz5y4c4pr4wsgbzixdl632w5qxvedqzryf54q 7750fd7b0928f007e1d181763c0dbdb5 'A DAG-JSON document. The block itself md5s to b92348005af4ae4795e6f312844fb359, but the response we are hashing here is an HTML preview page. This does mean this test breaks if you make the preview less ugly.'
url_case ipns en.wikipedia-on-ipfs.org/I/HFE_Too_Slow_1.JPG.webp 09c09b2654e8529740b5a7625e39e0c8 'An image fetched through DNSLink and HAMT sharded directories.' note
echo 'Skip as it takes too long.' url_case ipfs bafybeieb33pqideyl5ncd33kho622thym5rqv6sujrmelcuhkjlf2hdpu4/Big%20Buck%20Bunny.webm 06d51286e56badb4455594ebed6daba2 'A large UnixFS file - several hundred blocks.' error
url_case ipfs bafybeihmq5rnk5i4gwljixz64dns3pxt7ep2i3x7eylyfq7mkzgh4gtfh4/relative_link.txt cfe9b69523140b5b5e63874a8e4997e4 'A relative symlink resolves successfully to the file pointed to.'
url_case ipns planetable.eth/B5B2F107-A455-4B5A-AA14-B60EB7179ABF 6671d3bce06f61f5568632ae004d7dde 'DNSLink fallback to gateways to access non-DNS resolvers, in this case ENS'
unstable_case planetable.eth/B5B2F107-A455-4B5A-AA14-B60EB7179ABF '<title>Can I Use Planet While Offline?</title>'

echo Stop test server.
killall python3 2>/dev/null || true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ CMakeUserPresets.json
gotit.json
.kdev4/ipfs-chromium.kdev4
*.autosave.*
*.autosave
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ set(DEPOT_TOOLS_DIRECTORY "${default_dt}" CACHE PATH
"Where to find depot_tools, e.g. DEPOT_TOOLS_DIRECTORY/gn.py should exist. Setting this to DETECT_FROM_PATH implies the directory is in your PATH and always will be."
)
set(TEST_BY_DEFAULT FALSE CACHE BOOL "Update unit tests as part of the 'all' default target.")
set(USE_DOXYGEN TRUE CACHE BOOL "If we should attempt to use Doxygen to generate documentation.")
set(USE_CLANG_TIDY FALSE CACHE BOOL "Use clang-tidy, if found, to generate additional warnings.")
set(USE_DOXYGEN TRUE CACHE BOOL "If we should attempt to use Doxygen to generate documentation, if it's available.")
set(BRANDING_DIR "${CMAKE_CURRENT_LIST_DIR}/branding" CACHE PATH "Directory conataining branding files to synchronize. If empty, don't apply any branding changes.")
#End of user-configuration cache variables.

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

145 changes: 0 additions & 145 deletions chromium_edits/125.0.6368.2/components/cbor/values.cc.patch

This file was deleted.

Loading
Loading