I have a file that looks like this:
SF:/home/developer/project/test/resources/somefile.js DA:1,2 DA:3,2 end_of_record SF:/home/developer/project/src/resource
awk '{if($0~/SF:.*\/test\//){P=1;}if($0~/end_of_record/&& P==1){print;P=0;}if(P==1)print}' your_file