This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
forked from stacks-network/stacks-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: stable sh outputs in the right folder
- Loading branch information
Showing
9 changed files
with
186 additions
and
27 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
pox-locking/src/pox_1.rs:128: replace handle_contract_call -> Result<(), ClarityError> with Ok(()) | ||
pox-locking/src/pox_2.rs:217: replace pox_lock_extend_v2 -> Result<u128, LockingError> with Ok(1) | ||
pox-locking/src/pox_3.rs:72: replace pox_lock_extend_v3_not_tested -> Result<u128, LockingError> with Ok(0) | ||
pox-locking/src/events.rs:47: replace create_event_info_stack_or_delegate_code -> String with String::new() | ||
pox-locking/src/events.rs:351: replace synthesize_pox_2_or_3_event_info -> Result<Option<Value>, ClarityError> with Ok(None) | ||
pox-locking/src/events.rs:76: replace create_event_info_aggregation_code -> String with "xyzzy".into() | ||
pox-locking/src/pox_2.rs:248: replace pox_lock_v2 -> Result<(), LockingError> with Ok(()) | ||
pox-locking/src/pox_2.rs:280: replace handle_stack_lockup_pox_v2 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(None) | ||
pox-locking/src/pox_1.rs:90: replace pox_lock_v1 -> Result<(), LockingError> with Ok(()) | ||
pox-locking/src/pox_3.rs:363: replace handle_contract_call -> Result<(), ClarityError> with Ok(()) | ||
pox-locking/src/events.rs:103: replace create_event_info_data_code -> String with String::new() | ||
pox-locking/src/events.rs:103: replace create_event_info_data_code -> String with "xyzzy".into() | ||
pox-locking/src/pox_3.rs:236: replace handle_stack_lockup_extension_pox_v3 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(None) | ||
pox-locking/src/pox_2.rs:409: replace handle_stack_lockup_increase_pox_v2 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(None) | ||
pox-locking/src/pox_1.rs:69: replace is_read_only -> bool with false | ||
pox-locking/src/pox_3.rs:300: replace handle_stack_lockup_increase_pox_v3 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(None) | ||
pox-locking/src/pox_1.rs:69: replace is_read_only -> bool with true | ||
pox-locking/src/pox_2.rs:33: replace is_read_only -> bool with true | ||
pox-locking/src/pox_3.rs:87: replace pox_lock_extend_v3 -> Result<u128, LockingError> with Ok(1) | ||
pox-locking/src/pox_3.rs:169: replace handle_stack_lockup_pox_v3 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(None) | ||
pox-locking/src/pox_2.rs:33: replace is_read_only -> bool with false | ||
pox-locking/src/events.rs:76: replace create_event_info_aggregation_code -> String with String::new() | ||
pox-locking/src/lib.rs:65: replace handle_contract_call_special_cases -> Result<(), ClarityError> with Ok(()) | ||
pox-locking/src/pox_2.rs:345: replace handle_stack_lockup_extension_pox_v2 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(None) | ||
pox-locking/src/pox_3.rs:42: replace pox_lock_v3 -> Result<(), LockingError> with Ok(()) | ||
pox-locking/src/pox_3.rs:87: replace pox_lock_extend_v3 -> Result<u128, LockingError> with Ok(0) | ||
pox-locking/src/events.rs:47: replace create_event_info_stack_or_delegate_code -> String with "xyzzy".into() | ||
pox-locking/src/pox_2.rs:473: replace handle_contract_call -> Result<(), ClarityError> with Ok(()) | ||
pox-locking/src/pox_2.rs:217: replace pox_lock_extend_v2 -> Result<u128, LockingError> with Ok(0) | ||
pox-locking/src/pox_3.rs:72: replace pox_lock_extend_v3_not_tested -> Result<u128, LockingError> with Ok(1) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
pox-locking/src/events.rs:32: replace get_stacker -> Value with Default::default() | ||
pox-locking/src/events.rs:351: replace synthesize_pox_2_or_3_event_info -> Result<Option<Value>, ClarityError> with Ok(Some(Default::default())) | ||
pox-locking/src/pox_3.rs:236: replace handle_stack_lockup_extension_pox_v3 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(Some(Default::default())) | ||
pox-locking/src/pox_2.rs:409: replace handle_stack_lockup_increase_pox_v2 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(Some(Default::default())) | ||
pox-locking/src/pox_2.rs:127: replace parse_pox_increase -> std::result::Result<(PrincipalData, u128), i128> with Ok((Default::default(), 0)) | ||
pox-locking/src/pox_1.rs:36: replace parse_pox_stacking_result_v1 -> std::result::Result<(PrincipalData, u128, u64), i128> with Ok((Default::default(), 1, 1)) | ||
pox-locking/src/pox_2.rs:127: replace parse_pox_increase -> std::result::Result<(PrincipalData, u128), i128> with Ok((Default::default(), 1)) | ||
pox-locking/src/pox_2.rs:64: replace parse_pox_stacking_result -> std::result::Result<(PrincipalData, u128, u64), i128> with Ok((Default::default(), 0, 0)) | ||
pox-locking/src/pox_3.rs:123: replace pox_lock_increase_v3 -> Result<STXBalance, LockingError> with Ok(Default::default()) | ||
pox-locking/src/pox_3.rs:169: replace handle_stack_lockup_pox_v3 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(Some(Default::default())) | ||
pox-locking/src/pox_2.rs:164: replace pox_lock_increase_v2 -> Result<STXBalance, LockingError> with Ok(Default::default()) | ||
pox-locking/src/pox_1.rs:36: replace parse_pox_stacking_result_v1 -> std::result::Result<(PrincipalData, u128, u64), i128> with Ok((Default::default(), 1, 0)) | ||
pox-locking/src/pox_1.rs:36: replace parse_pox_stacking_result_v1 -> std::result::Result<(PrincipalData, u128, u64), i128> with Ok((Default::default(), 0, 1)) | ||
pox-locking/src/pox_3.rs:300: replace handle_stack_lockup_increase_pox_v3 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(Some(Default::default())) | ||
pox-locking/src/pox_2.rs:98: replace parse_pox_extend_result -> std::result::Result<(PrincipalData, u64), i128> with Ok((Default::default(), 0)) | ||
pox-locking/src/pox_2.rs:64: replace parse_pox_stacking_result -> std::result::Result<(PrincipalData, u128, u64), i128> with Ok((Default::default(), 0, 1)) | ||
pox-locking/src/pox_2.rs:98: replace parse_pox_extend_result -> std::result::Result<(PrincipalData, u64), i128> with Ok((Default::default(), 1)) | ||
pox-locking/src/pox_2.rs:280: replace handle_stack_lockup_pox_v2 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(Some(Default::default())) | ||
pox-locking/src/pox_2.rs:64: replace parse_pox_stacking_result -> std::result::Result<(PrincipalData, u128, u64), i128> with Ok((Default::default(), 1, 0)) | ||
pox-locking/src/pox_1.rs:36: replace parse_pox_stacking_result_v1 -> std::result::Result<(PrincipalData, u128, u64), i128> with Ok((Default::default(), 0, 0)) | ||
pox-locking/src/pox_2.rs:345: replace handle_stack_lockup_extension_pox_v2 -> Result<Option<StacksTransactionEvent>, ClarityError> with Ok(Some(Default::default())) | ||
pox-locking/src/pox_2.rs:64: replace parse_pox_stacking_result -> std::result::Result<(PrincipalData, u128, u64), i128> with Ok((Default::default(), 1, 1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
stx-genesis/src/lib.rs:108: replace <impl Iterator for LinePairReader>::count -> usize with 1 | ||
stx-genesis/src/lib.rs:100: replace <impl Iterator for LinePairReader>::next -> Option<Self::Item> with None | ||
stx-genesis/src/lib.rs:108: replace <impl Iterator for LinePairReader>::count -> usize with 0 | ||
stx-genesis/src/lib.rs:100: replace <impl Iterator for LinePairReader>::next -> Option<Self::Item> with None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
stx-genesis/src/lib.rs:71: replace GenesisData::read_namespaces -> Box<dyn Iterator<Item = GenesisNamespace>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:148: replace read_lockups -> Box<dyn Iterator<Item = GenesisAccountLockup>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:78: replace GenesisData::read_names -> Box<dyn Iterator<Item = GenesisName>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:140: replace read_balances -> Box<dyn Iterator<Item = GenesisAccountBalance>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:157: replace read_namespaces -> Box<dyn Iterator<Item = GenesisNamespace>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:129: replace iter_deflated_csv -> Box<dyn Iterator<Item = Vec<String>>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:140: replace read_balances -> Box<dyn Iterator<Item = GenesisAccountBalance>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:85: replace GenesisData::read_name_zonefiles -> Box<dyn Iterator<Item = GenesisZonefile>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:78: replace GenesisData::read_names -> Box<dyn Iterator<Item = GenesisName>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:64: replace GenesisData::read_lockups -> Box<dyn Iterator<Item = GenesisAccountLockup>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:115: replace read_deflated_zonefiles -> Box<dyn Iterator<Item = GenesisZonefile>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:57: replace GenesisData::read_balances -> Box<dyn Iterator<Item = GenesisAccountBalance>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:115: replace read_deflated_zonefiles -> Box<dyn Iterator<Item = GenesisZonefile>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:171: replace read_names -> Box<dyn Iterator<Item = GenesisName>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:148: replace read_lockups -> Box<dyn Iterator<Item = GenesisAccountLockup>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:64: replace GenesisData::read_lockups -> Box<dyn Iterator<Item = GenesisAccountLockup>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:85: replace GenesisData::read_name_zonefiles -> Box<dyn Iterator<Item = GenesisZonefile>> with Box::new(Default::default()) | ||
stx-genesis/src/lib.rs:71: replace GenesisData::read_namespaces -> Box<dyn Iterator<Item = GenesisNamespace>> with Box::new(Default::default()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# the append-match-package.sh | ||
## goes through each line in the output and based on the package ( first element before /) | ||
### verifies the line with the other lines in that specific folder | ||
#### in our case folder_name == package_name | ||
|
||
|
||
# goes through each PR file line by line | ||
# for each first_element/the_rest_of_the_line goes through it | ||
## search in that specific folder on all 4 files | ||
## if it is matchy, remove it from that file | ||
## based on the file it was taken from, append it to the same file in the STABLE folder | ||
|
||
|
||
|
||
#!/bin/bash | ||
|
||
PR_FOLDER="./../temp/mutants.out" | ||
STABLE_FOLDER_PARENT="./../packages-output" | ||
FILES=("caught.txt" "missed.txt" "timeout.txt" "unviable.txt") | ||
|
||
echo "Starting script..." | ||
echo "PR Folder: $PR_FOLDER" | ||
echo "STABLE Folder: $STABLE_FOLDER_PARENT" | ||
echo "Files to process: ${FILES[*]}" | ||
|
||
# Function to escape special characters for awk | ||
escape_for_awk() { | ||
echo "$1" | sed -E 's/([][\/$*.^|])/\\&/g' | ||
} | ||
|
||
# Iterate over the specified files | ||
for file in "${FILES[@]}"; do | ||
pr_file="$PR_FOLDER/$file" | ||
stable_file="$STABLE_FOLDER_PARENT/$file" | ||
|
||
echo "Processing file: $file" | ||
|
||
# Check if PR file exists and is not empty | ||
if [[ -s "$pr_file" ]]; then | ||
# Read each line from the PR file | ||
while IFS= read -r line; do | ||
echo "Reading line from PR file: $line" | ||
|
||
# Extract the core pattern without the line number and escape it for awk | ||
core_pattern=$(echo "$line" | sed -E 's/^[^:]+:[0-9]+:(.+)/\1/') | ||
escaped_pattern=$(escape_for_awk "$core_pattern") | ||
echo "Extracted and escaped pattern: $escaped_pattern" | ||
|
||
# Iterate over each file in the STABLE folder | ||
for target_file in "${FILES[@]}"; do | ||
target_path="$STABLE_FOLDER_PARENT/$target_file" | ||
echo "Checking against STABLE file: $target_path" | ||
|
||
# Remove the line matching the pattern, ignoring line numbers | ||
awk -v pat="$escaped_pattern" '$0 !~ pat' "$target_path" > temp_file && mv temp_file "$target_path" | ||
done | ||
done < "$pr_file" | ||
else | ||
echo "PR file $pr_file is empty or does not exist, skipping..." | ||
fi | ||
done | ||
|
||
# After processing all lines, append contents from PR_DIR to STABLE_DIR | ||
for file in "${FILES[@]}"; do | ||
cat "$PR_FOLDER/$file" >> "$STABLE_FOLDER_PARENT/$file" | ||
done | ||
|
||
# Echo the contents of the STABLE folder for verification | ||
echo "Updated contents of STABLE folder:" | ||
for file in "${FILES[@]}"; do | ||
stable_file="$STABLE_FOLDER_PARENT/$file" | ||
echo "Contents of $stable_file:" | ||
cat "$stable_file" | ||
echo "" | ||
done | ||
|
||
echo "Script completed." | ||
|
||
|
||
|
||
|
||
# goes only through txt | ||
|
||
|
||
|
||
|
||
# remove temp/mutants.out | ||
## rm -rf ../temp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
# script that makes .git for the differences | ||
# it saves the .git on scripts folder | ||
|
||
# it runs cargo mutants for those specific changed functions | ||
# run from scripts folder | ||
cd .. | ||
git diff > git.diff | ||
|
||
# it creates a new output | ||
# it runs cargo mutants for those specific changed functions and outputs to /temp/mutants.out | ||
# for faster builds: increase number to 4 if at least 16 gb ram and 6 cores CPU | ||
cargo mutants --no-shuffle -j 2 -vV --in-diff git.diff --output temp/ | ||
|
||
|
||
# then the append-match-package.sh is called | ||
## TODO: update append-match-package.sh with what would be the output from the cargo mutants diff | ||
# call append-match-package.sh to update the content from the stable output | ||
### sh scripts/append-match-package.sh | ||
|
||
|
||
|
||
# the append-match-package.sh | ||
## goes through each line in the output and based on the package ( first element before /) | ||
### verifies the line with the other lines in that specific folder | ||
#### in our case folder_name == package_name | ||
|